2023 2024 EduVark > Education Discussion > General Discussion


  #1  
June 13th, 2014, 11:11 AM
Super Moderator
 
Join Date: Mar 2012
DOEACC Society B Level Course Programming and Problem Solving Through C Language pre

Will you please give me the DOEACC Society B Level Course Programming and Problem Solving Through C Language previous years question papers?

As you want to get the DOEACC Society B Level Course Programming and Problem Solving Through C Language previous years question papers so here is the information of the same for you:

PART ONE
(Answer all the questions)
1. Each question below gives a multiple choice of answers. Choose the most
appropriate one and enter in the “tear-off” answer sheet attached to the question
paper, following instructions therein. (1 x 10)
1.1 Given the following code fragment:
void main(void)
{
char x = ‘\0’;
char n = ‘N’;
printf(“%u” ”%s\n”, &n, &n);
}
What will be the result of execution?
A) ddddd N ( where d represents any digit)
B) 78 N
C) 78 garbage
D) compilation error
1.2 Given the following code fragment:
int main(void)
{
int raw[20], i, sum=0;
int *p = raw;
for (i=0; i < 20; i++)
*(p+i) = I;
for(i=0; i < 20; I += sizeof(int))
sum += *(p+i)
printf(“sum = %d\n”, sum);
return();
}
What will be the result of execution?

A) sum = 10
B) sum = 40
C) sum = 60
D) sum = 190
1.3 What is the missing statement in the following function which copies string x into string y
void strcpy( char *x, char *y)
{
while (*y != ‘\0’)
………………… /* missing stament */
*x = ‘\0’;
}
A) x = y
B) *x++ = *y++
C) (*x)++ = (*y)++
D) none of the above
1.4 Consider the following program,
main( )
{
int x = 49;
for(;x
x--;
printf(“%d\n”, x);
}
the output of the program will be
A) 49
B) 0
C) -49
D) none of the above
1.5 # define dp(e) printf(#e “ = %d\n”,e)
main( )
{
int x =3, y = 2;
dp(x/y)
}
What will be the output of the program?
A) prints x/y = 1
B) prints #e = 1.5
C) prints #x/y = 1
D) none of the above
1.6 Assume that i, j and k are integer variables and their values are 8, 5 and 0 respectively.
What will be the values of variables i and k after executing the following expressions?
k = ( j > 5) ? ( i < 5) ? i-j: j-i: k-j;
i -= (k) ? (i) ? (j): (i): (k);
A) -3 and 3
B) 3 and -5
C) 3 and -3
D) -5 and 3

1.7 The && and | | operators
A) compare two numeric values
B) combine two numeric values
C) compare two boolean values
D) none of the above
1.8 An external variable is one
A) Which resides in the memory till the end of the program
B) Which is globally accessible by all functions
C) Which is declared outside the body of any function
D) All of the above
1.9 Find the error in the following program:
main( )
{
int m;
char g;
switch(m)
{
case 5 : grade=”P”;break;
case 2 : grade=”Q”;break;
case 2 : grade=”R”;break;
default : grade=”S”;break;
}
}
A) No two labels may be identical
B) switch statement cannot have more than three labels
C) case label cannot be numbers
D) none of the above
1.10 Consider the following program:
main( )
{
char *k=”xyz;
f(k);
printf(“%s\n”,k);
}
f(char *k)
{ k = malloc(4); strcpy(k, “pq”); }
What will be the output?
A) pq
B) xyz
C) syntax error
D) none of the above

2. Each statement below is either TRUE or FALSE. Choose the most appropriate one
and ENTER in the “tear-off” sheet attached to the question paper, following
instructions therein. (1 x 10)
2.1 Arrays in ‘C’ language are always stored in column-major fashion.
2.2 for(; will give syntax error in ‘C’ language.
2.3 For command line arguments, argv is a pointer to an array of pointers.
2.4 A member of any structure is referred to in an expression by a construction of the form
structure-name → member.
2.5 Bitwise fields can be of any type.
2.6 goto statement transfer the control from one function to another.
2.7 An array’s name is a pointer constant.
2.8 C allows different variables to have the same name.
2.9 Variables defined in the same function always have the same scope.
2.10Each symbol constant requires a separate # define directive to create it.

3. Match words and phrases in column X with the closest related meaning/
word(s)/phrase(s) in column Y. Enter your selection in the “tear-off” answer sheet
attached to the question paper, following instructions therein. (1 x 10)
X Y
3.1 Parameter passing scheme in ‘C’ A. Dangling pointer
3.2 Size of ‘char’ variable in byte/bytes B. Postfix expression
3.3 Heap C. Call by value
3.4 Double (*X)[10] D. 2
3.5 0x7FFF refers to a constant E. Garbage pointer
3.6 Implementation of library function F. Expression
3.7 Pointer with address of a free variable G. Area for Dynamic memory allocation
3.8 Object H. 1
3.9 Lvalue I. Storage
3.10 Function call J. Double x[10]
K. Octal
L. Header
M. Double x[ ] [10]
N. Hexadecimal
O. Library

4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in
the list below. Enter your choice in the “tear-off” answer sheet attached to the
question paper, following instructions therein. (1 x 10)
Equality Inequality Equal
Different Double Single
Fixed Variable fseek(fp, 0L, 0)
fseek(fp, 0L, 1) semicolon prenthesis
4 bytes do…while while…do
| || t
(*t)
4.1 Operators &, ^, = = have ________ precedence.
4.2 The logical operator = = checks for ________ of two values.
4.3 A character constant is a sequence of one or more characters enclosed in ________
quotes.
4.4 printf( ) function uses ________ number of arguments.
4.5 rewind (fp) and ________ performs the same operation.
4.6 The contents of two pointers that point to adjacent variables of type float differ by
________.
4.7 A function name must be followed by ________.
4.8 ________ iterative statement will always be executed atleast once.
4.9 ________ is the bitwise inclusive or operator.
4.10 If “t” is a pointer to a structure then “t→” is the same as ________.

PART TWO
(Answer any FOUR questions)
5.
a) The sequence of Fibonacci numbers is defined as below:
f(i) = f(i-1) + f(i-2) with f(0) = 1 and f(1) = 1
Draw a flowchart and then develop a ‘C’ program to calculate and display Fibonacci
numbers.
b) Write a ‘C’ program to calculate the frequencies of different alphabets, present in a given
string. The string of alphabets is to be taken as input from the keyboard.
(7+8)

6.
a) Write a ‘C’ program to do the following:
i) Accept a sequence of integer numbers from the keyboard
ii) Sort the sequence in ascending order
iii) Output the position of each element of the input sequence in the sorted array.
b) Develop a flowchart and then develop ‘C’ program to find the union of two set of
characters, taken as input from the keyboard.
(8+7)

7.
a) Write a ‘C’ program to accept any 3 digit integer number from the keyboard and display
the word equivalent representation of the given number.
b) Write a ‘C’ program to accept a date in the format DD/MM/YYYY and add an integer to
get the resultant date.
(9+6)

8. Define a suitable data structure to store the information like student name, roll number,
enrolment centre and marks of five different subjects. Write a ‘C’ function to insert
sufficient data in your data structure and function to print the name of the student and
the total obtained marks who have secured highest total marks for each and every
enrolment centre
(15)

9.
a) Define a self referential structure to represent a set of integer numbers in linked list form.
b) Write a ‘C’ function to split the list in several sub-lists depending on the number of digits
representing the integers i.e. single digit integers will form a list, double digit numbers
will form another list and so on.
(3+12)

PART ONE
(Answer all the questions)
1. Each question below gives a multiple choice of answers. Choose the most
appropriate one and enter in the “tear-off” answer sheet attached to the question
paper, following instructions therein. (1 x 10)
1.1 The operator & is used for
A) Bitwise AND
B) Bitwise OR
C) Logical AND
D) Logical OR
1.2 Built-in data structures in ‘C’ are
A) Arrays
B) Structures
C) Files
D) All of the above
1.3 The size of a character variable in ‘C’ is
A) 4 byte
B) 8 bytes
C) 16 bytes
D) None of the above
1.4 What is the output of the following program segment?
#include<stdio.h>
main()
{
int i=10, m=10;
clrscr();
printf(“%d”, i>m?i*i:m/m,20);
getch();
}

A) 20
B) 1
C) 120
D) 100 20
1.5 Data type of the controlling statement of a SWITCH statement cannot of the type:
A) int
B) char
C) short
D) float
1.6 How long the following loop runs:
for (x=0; x=3; x++)
A) Three time
B) Four times
C) Forever
D) Never
1.7 An expression contains assignment, relational and arithmetic operators. If parentheses
are not specified, the order of evaluation of the operators would be:
A) assignment, arithmetic, relational
B) relational, arithmetic, assignment
C) assignment, relational, arithmetic
D) arithmetic, relational, assignment
1.8 The CONTINUE statement cannot be used with
A) for
B) switch
C) do
D) while
1.9 Output of the following program will be:
main( )
{
int a [ ] = {1, 2, 9, 8, 6, 3, 5, 7, 8, 9};
int *p = a+1;
int *q = a+6;
printf (“\n%d”, q-p);
}
A) 9
B) 5
C) 2
D) None of the above
1.10 Size of the following union (assume size of int=2; size of float=4 and size of char = 1):
union Jabb
{
int a;
float b;
char c;
};
A) 2
B) 4
C) 1
D) 7

2. Each statement below is either TRUE or FALSE. Choose the most appropriate one
and ENTER in the “tear-off” sheet attached to the question paper, following
instructions therein. (1 x 10)
2.1 Scalar data types are not supported by ‘C’ language.
2.2 ‘C’ language allows arrays of any dimensions.
2.3 A structure cannot be read as a single entity.
2.4 The associativity of operator ! is from left to right. .
2.5 J++ executes faster than J+1 because ++ is faster than +.
2.6 Two structures cannot be compared automatically.
2.7 The code "a[i] = i++;" is valid and will execute.
2.8 Arrays automatically allocate space when declared.
2.9 sizeof(‘a’) is not 1.
2.10 Float value can be added to a pointer.

3. Match words and phrases in column X with the closest related meaning/
word(s)/phrase(s) in column Y. Enter your selection in the “tear-off” answer sheet
attached to the question paper, following instructions therein. (1 x 10)
X Y
3.1 The operator && is an example of A. Arrays
3.2 Preprocessor commands are always
preceded by
B. Storage class
3.3 Header files in ‘C’ contain C. /0
3.4 Structures in ‘C’ can be used with D. Shifting bits
3.5 Static defines a E. #
3.6 Null character is represented by F. string.h
3.7 File manipulation functions are available
in
G. Masking
3.8 An example of unconditional control
structure is
H. Switch statement
3.9 Header file required for strcpy I. Logical
3.10 The bitwise AND operator is used for J. #define
K. Macro definitions
L. stdio.h
M. Goto
N. strcpy
O. Library functions

4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in
the list below. Enter your choice in the “tear-off” answer sheet attached to the
question paper, following instructions therein. (1 x 10)
A. integer array B. pointers C. program
D. printf( ) and scanf( ) E. character array F. &&
G. function H. Main I. getw( )
J. reference, value K. static L. for
M. extern N. ternary O. register
P. putw( ) Q. main( )
4.1 Formatted I/O can be produced with the routine(s) ________.
4.2 The ________statement is used to loop as long as a specified condition is met.
4.3 To create a string variable, me must declare a(n) ________ with enough elements to
contain the entire string.
4.4 Call by ________ is more efficient than call by file.
4.5 exit( ) function is used to terminate the ________.
4.6 The only operator that contains three operands is ________ operator.
4.7 The declaration ________ does not allocate storage space for variable.
4.8 The function ________ reads an integer from a file.
4.9 All buffers are cleared when a ________ closed.
4.10 Preprocessor directives are placed in the source program before the function ________.

PART TWO
(Answer any FOUR questions)
5.
a) What are the commonly used input functions in ‘C’? Write their syntax and explain the
purpose of each.
b) Develop a flowchart and then write a program to compute the roots of a quadratic
equation A*X^2 + B*X + C = 0. Allow the possibility that (B^2 – 4*A*C) <= 0.
(6+9)

6.
a) What are logical, syntactic and execution errors? Give examples of each. Which is most
difficult to find and why?
b) Enumerate features of a good ‘C’ program. Describe the commonly used techniques as
to how ‘C’ programs can be made highly readable and modifiable.
c) What is an algorithm? Develop an algorithm to test whether a given number is a prime
number.
(5+5+5)

7.
a) Develop loops using
i) While statement
ii) Do-while statement
iii) For statement
that will calculate the sum of every third integer, beginning with k=2 for all values of
k <= 100.
b) Write a function that will compute
Y = X^n
Where Y and X are floating point numbers and n is an integer number. Use this function
and print the output
X n Y
… … …
Check for possible exceptions that may occur during computations with regard to the
magnitude of computed values.
(6+9)

8.
a) How does an array differ from a structure? Give and explain the syntax of array and
structure as defined in ‘C’.
b) How are one-dimensional and two-dimensional arrays stored in computer memory?
Illustrate with an example.
c) Develop a program to multiply two matrices with sizes 3x4 and 4x5. Your program
should take care of the fact that no element of either matrix can be negative. Include
appropriate documentation.
(6+2+7)

9.
a) Give the main advantage of storing data as a file. Describe various ways in which data
files can be categorized in ‘C’. Illustrate by examples.
b) What is an indirection operator? Explain its usage to access a multidimensional array
element. Illustrate your answer by an example.
c) ‘C’ compiler supports many pre-processor commands. Write their names only.
(6+6+3)

Last edited by Neelurk; March 31st, 2020 at 12:28 PM.
Similar Threads
Thread
Doeacc O Level Course At Jadavpur University
Elitmus Problem Solving
Elitmus Problem Solving Questions
Joomla Programming Language
DOEACC O Level Exam Form
BCPL Programming Language
After DOEACC O and A level Job Opportunities
DOEACC O level course details
DOEACC O Level Institutes in Delhi
DOEACC - O level, M3-R3 Internet and Web Design Exam old Papers
Java is a pure object oriented programming language or not?
DOEACC A Level A6- R3 Data Structure Through C Language Exam paper
DOEACC, B Level Course, Computer Graphics Exam Papers
DOEACC Society B Level Course Software Engineering & Case Tools Exam - Question Paper
DOEACC Society B level course Software Testing and Quality Management previous years



Quick Reply
Your Username: Click here to log in

Message:
Options



All times are GMT +5. The time now is 06:56 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.6.0

1 2 3 4 5 6 7 8