1. A matrix A for which AP = 0 where P is a positive integer is called
(a) skew symmetric
(b) unit matrix
(c) symmetric
(d) nilpotent
2. If A = 0 4
0 0, then A2 =
(a) 0 1
0 0
(b) 0 0
0 0
(c) 0 16
0 0 
(d) 0 4
0 0
3. If A = 3 − 4
1 − 1  then An is
(a) 2n − 4n + 1
n 1 − 2n 
(b) 1 + 2n − 4n
n 1 − 2n 
(c) 1 + 3n − 4n
n 1 + 2n 
(d) 1 + 3n − 4n
n 1 − 2n 
4. If  1 − k 2
3 1 + k  + A=  2 0
0 2  , then A =
(a)  1 − k − 2
−3 1 + k 
(b)  1 + k 2
−3 1 − k 
(c)  1 + k 2
3 1 − k 
(d)  1 + k − 2
−3 1 − k 
5. The matrix  0 6
0 0  is a matrix
(a) Involutary
(b) Nilpotent
(c) Orthogonal
(d) Skew-symmetric
6. The rank of a 3 × 5 matrix in which one row is a constant multiple of the other is lessthan or equal to
(a) 2
(b) 1
(c) 5
(d) 3
7. L U decomposition method fails if lii = uii =
(a) 3
(b) 0
(c) 2
(d) 1
8. The rank of a matrix A = 264
1 2 3
0 x 4
1 − 1 1
375
is 2, then the value of x is
(a) 5
(b) 3
(c) 6
(d) 4
9. The value of x and y, if  0 − 1
1 0   x
y  =  5
4 
(a) x = 4 , y = -5
(b) x = 4 , y = 5
(c) x = 4 , y = 3
(d) x = 1 , y = 2
10. If A is a non singular matrix then the linear system AX = 0 has only
(a) the zero solution
(b) a non-zero solution
(c) infinite solution
(d) unique solution
11. Characteristic equation of A = 24
2 2 − 7
2 1 2
0 1 − 3 35 is
(a) 3+15+12 = 0
(b) 3−13−12 = 0
(c) 3−13+12 = 0
(d) 3−15+12 = 0
12. Eigen values of A =  1 0
3 2  are
(a) 1,2
(b) 2,3
(c) - 1, -2
(d) 0,1
13. If one of the eigen values of A is zero, then A is
(a) singular
(b) skew - symmetric
(c) non-singular
(d) symmetric
14. The normalized eigen vector corresponding to the eigen value  = 2 for the vector ( 2, 1) is
(a) (-2/p5, 1/p5 )
(b) (1/p5, 1/p5 )
(c) (2/ p5, 1/p5 )
(d) (2/p5,−1/p5 )
15. The eigen vector corresponding to the eigen value is
(a) independent
(b) Dependent
(c) not unique
(d) unique
16. The characteristic equation of a square matrix A is 3 − 32 − 7 - 11 = 0, then A−2 =
(a) 1
11[A + 7A−1+3I] = 0
(b) 1
11[A + 7A−1−3I] = 0
(c) 1
11[A − 7A−1+3I] = 0
(d) 1
11[A − 7A−1−3I] = 0
17. If the characteristic equation of the square matrix A is 2 - 4 = 0 then A4 =
( where I is the second order unit matrix )
(a) 16 I
(b) 4 I
(c) I
(d) 64 I
18. The diagonal matrix has the eigen values of A as its elements
(a) positive
(b) diagonal
(c) row
(d) real
19. Given A =  4 1
3 2  , P =  1 1
−3 1  and D =  1 0
0 5  then the value of P−1A4P =
(a)  1 0
0 125 
(b)  1 0
0 25 
(c)  1 0
0 625 
(d)  1 0
0 5 
20. If D is the diagonal matrix with eigen values of A as the principal diagonal elements then D is
(a) spectral matrix
(b) Model matrix
(c) Null matrix
(d) Unit matrix
D B B D B A B C B A C A A C C D A B C A

MM online bits

1. A square matrix is said to be lower triangular matrix if
(a) aij = 0 , 8 i > j
(b) aij = 0, 8 i = j
(c) aij = 0 , 8 i < j
(d) aij = 1, 8 i = j
2. (AB)−1 =
(a) (BA)−1
(b) B−1A−1
(c) −B−1A−1
(d) A−1B−1
3. Matrix A is said to be skew - symmetric matrix if AT =
(a) −AT
(b) -A
(c) I
(d) A
4. If A 0 1
2 − 1 = 0 4
0 0 , then A is
(a) 2 1
1 0
(b)  2 1
−1/2 − 1/2
(c) 2 1
0 − 1
(d) 2 1
0 0
5. If the matrix A = 2 3
5 − 1 is expressed as the sum of a symmetric and a skew symmetric. Then the skew -
symmetric matrix is
(a) 2 1
2 4
(b) 4 2
2 − 1
(c) 0 − 1
1 0 
(d) 2 4
4 1
6. If A = 1 2
2 1, B = 1 1
1 1, then AB is
(a) 2 2
2 2
(b) 1 1
1 1
(c) 4 4
4 4
(d) 3 3
3 3
7. L U decomposition method fails if lii = uii =
(a) 2
(b) 1
(c) 3
(d) 0
8. The system of equations AX = B has an infinite number of solution if
(a) R(AB) = R(A) = r = n
(b) R(AB) = R(A) = r > n
(c) R(AB) 6= R(A) > n
(d) R(AB) = R(A) = r < n
9. If every minor of order r of a matrix A is non-zero, then rank of A is
(a) equal to r
(b) greater than or equal to r
(c) less than r
(d) less than or equal to r
10. The solution of system of equations x + y + z = 1 , 2x + 3y + 2z = 2, 5x + 4y + 3z = 3 is
(a) x = 1 , y = 0 z = 0
(b) x = 0 , y = 0 , z = 1
(c) x = y = z = 0
(d) x = y = z = 1
11. Characteristic equation of A = 24
1 1 − 2
−1 2 1
0 1 − 1 35 is
(a) 3+22−3+2 = 0
(b) 3+22−+2 = 0
(c) 3+22+3+2 = 0
(d) 3−22−+2 = 0
12. If A =  1 0
0 5  then the eigen values of A2 are
(a) -1, -5
(b) 1, -2
(c) 1, 5
(d) 1, 25
13. The eigen values of A−1 , where A = 24
2 7 6
0 4 1
0 0 5 35 are
(a) -1/2, -1/4, 1/5
(b) 1/2, 1/4, 1/5
(c) 2, 4, 5
(d) 1/2, 1/4, -1/5
14. If X = 24
x1
x2
x3
35
be the eigen vector corresponding to the eigen value  , then
( A - I) X=
(a) I
(b) - 1
(c) 1
(d) 0
15. If X1 and X2 are two eigen vectors of a matrix A corresponding to the same eigen value  of A then any linear
combination of the form isalso gives eigen vector of A corresponding to the same eigen value 
(a) k1X1 + k2X2
(b) X1 + X2
(c) X1 − X2
(d) k1X1 − k2X2
16. The characteristic equation of a square matrix A is 3 − 32 − 7 - 11 = 0, then A−2 =
(a) 1
11[A − 7A−1−3I] = 0
(b) 1
11[A + 7A−1−3I] = 0
(c) 1
11[A + 7A−1+3I] = 0
(d) 1
11[A − 7A−1+3I] = 0
17. If 1, 2, 3 are the latent roots of a square matrix A , then the latent roots of A2 are
(a) −1
2,2
2,3
2
(b) −1/1,−1/2, 1/3
(c) 1/1, 1/2, 1/3
(d) 1
2,2
2,3
2
18. The diagonal matrix has the eigen values of A as its elements
(a) positive
(b) real
(c) diagonal
(d) row
19. If the eigen vector of A is X =  1
−2  then eigen vector of A2 is
(a) X3
(b) X2
(c) - X2
(d) X
20. The matrix B which diagonalises A is matix.
(a) modal
(b) spectral
(c) Orthogonal
(d) symmetric

C B B B C D D D B B D D B D A A D C D A

cds bits

1. Pick up the wrong sequence
(a) Program coding, Debugging, Data analysis
(b) Data analysis, Development of algorithm, Program coding
(c) Problem identification, Task analysis, Data analysis
(d) Problem coding, Testing, Debugging
2. A machine language program consists of instructions written in
(a) keywords
(b) english like words
(c) mnemonics
(d) 0’s and 1’s
3. What is the valid identifier in the following
(a) @hgd12
(b) fahs%*
(c) q1234
(d) 1fdasgf
4. Which of the following is a derived data type in ‘C’
(a) Float
(b) Char
(c) Array
(d) Int
5. A character constant is assigned within
(a) paranthers
(b) double quotes
(c) no quotes
(d) single quotes
6. Which of the following arithmetic expression is invalid
(a) 2 + + + + + 3
(b) 7.5 % 3
(c) 2 + 3/5
(d) 2/3 + 4
7. Which of the following is the ternary operator in C
(a) ::
(b) ?;
(c) ?:
(d) ??
8. Which of the following comments about the ++ operator is not correct
(a) The operand can come before the operator
(b) It is unary operator
(c) The operand can come after the operater
(d) It can be applied to an expression
9. x = 9 - ((12 / 3 ) + 3 * 2 ) - 1 what is the value of x.
(a) 10
(b) 2
(c) -2
(d) 8
10. The single character input/output functions are
(a) scanf and putchar
(b) getchar and putchar
(c) scanf and printf
(d) getchar and printf
11. Which one of the following is not a loop control structure.
(a) do-while
(b) for
(c) if
(d) while
12. Assume all variable are declared What is the output of the following code.
count = 0;
while (count != 100);
{ count = 1;
sum = sum + x;
count = count + 1;
}
(a) Error
(b) It will give count as 10
(c) it will give the sum of 1st10 natural numbers
(d) It is in infinite loop
13. A character array always ends with a
(a) null (\0) character
(b) fullstop ()
(c) semicolon (;)
(d) question mark (?)
14. The total number of elements in array a[n][m]
(a) n+m
(b) n*m
(c) (n+1) * (m+1)
(d) (n-1)*(m-1)
15. A string with spaces can be read using a function.
(a) getsentences()
(b) gets()
(c) getch()
(d) getchar()
16. main() is
(a) friendly function
(b) user defined function
(c) library function
(d) member function
17. What is the output of the following program:
main()
{int x,y;
x = 40; y = 80;
change (&x, &y);
printf (“%d %d”, x,y);
}change (
int *
a, int *
b)
{int *k;
* k = *a;
*a = *b;
*b = *k;
}
(a) 40 80
(b) 40 80
(c) 80 40
(d) 80 80
18. How many arguments that the strcmp() function can take
(a) one
(b) three
(c) four
(d) two
19. Register variables can hold ———– values
(a) int
(b) double
(c) complex
(d) float
20. Which of the following is a correct way of defining a symbolic constant pie in C
(a) # Define pie 22/7
(b) # define pie = 22/7
(c) #define pie= 3.142
(d) #define pie 22/7

A D C C D B C D C B C D A B B B C D A D
1. The error in a program is called
(a) bug
(b) virus
(c) vaccine
(d) flow
2. C is a
(a) Low level language
(b) High level language
(c) High level language with some low level features
(d) Machine language
3. Which of the following is not a keyword
(a) enum
(b) storage
(c) signed
(d) register
4. What is the size of long double variable
(a) 8 bytes
(b) 10 bytes
(c) 16 bytes
(d) 4 bytes
5. Which is an invalid variable name:
(a) Xx
(b) floating
(c) Int
(d) net-salary
6. main( )
{ float a;
int x = 6; y = 4;
a = x/y;
print (“%f”,a)
}what is the output
(a) 1.00
(b) 1.5
(c) error
(d) 0.5
7. The operators *, || ,<,= if arranged in the ascending order of precedence reads
(a) = ,||, <, *
(b) *, || , =
(c) <, || ,= , *
(d) = ,< , || , *
8. a=30; a<<2 =?
(a) 10
(b) 150
(c) 180
(d) 120
9. int C;
C=25/2; What is the value of C
(a) 12
(b) 12.500000
(c) 12.000000
(d) 0.5
10. The single character input/output functions are
(a) scanf and printf
(b) getchar and printf
(c) scanf and putchar
(d) getchar and putchar
11. Identify the wrong statement:
(a) if (a >b) {; ; }
(b) if (a(c) if (a(d) if a12. Which command is used to skip the rest of a loop and carry on from the top of the loop again?
(a) continue;
(b) switch;
(c) resume;
(d) break;
13. Array is used to represent the following
(a) A list of data items of real data type
(b) A list of data items of same data type
(c) A list of data items of integer data type
(d) A list of data items of different data type
14. Identify the incorrect declaration of arrays from the following
(a) int a[50];
(b) float values[10][20];
(c) int score[10,15];
(d) double a[50];
15. A string in the ‘C’ language is represented by enclosing a sequence of characters in
(a) parenthesis
(b) flower brackets
(c) double quotes
(d) single quotes
16. A function is one that returns no value.
(a) float
(b) Integer
(c) recursive
(d) void
17. Recursion means
(a) Function calling a function
(b) Function calling a same function
(c) Passing a function to a function
(d) Function without a return value
18. If the character type variable sym is assigned a value ‘y’ and the string variable str is assigned a value LEARN.
What is the value in str after execution of the following statement strset(str,sym)
(a) yyyyy
(b) LEARNY
(c) Y
(d) LEARY
19. Which of the following statement is wrong with respect to a storage class
(a) it specifies the defualt initial value
(b) by defualt a storage class is static
(c) it specifies the life of a variable
(d) if specifies where variable is stored
20. The header file that must be included at the beginning of a C program to use a library function cos is
(a) conio.h
(b) dos.h
(c) math.h
(d) stdlib.h

A C B B D A A D A D D A B C C D B A B C
1. The symbol with rounded ends is used to represent
(a) decision making
(b) start/ stop
(c) equation processing
(d) input/output
2. The character which is used as a statement terminator in a ‘C’ program is
(a) ,
(b) :
(c) .
(d) ;
3. What are the smallest individual units in a program
(a) Structures
(b) record
(c) Functions
(d) Tokens
4. What is size of double variable?
(a) 10 Bytes
(b) 4 Bytes
(c) 1 byte
(d) 8 Bytes
5. Variables are initialized in C, using
(a) = =
(b) =
(c) >
(d) : =
6. Associativity of arithmetic operators is from
(a) middle to left
(b) left to right
(c) right to left
(d) middle to right
7. The equality relational operator is represent by
(a) ==
(b) :=
(c) .EQ.
(d) =
8. The symbol for right shift operator is
(a) >
(b) − >
(c) <=
(d) >>
9. float c,
c=25/2; What is the value of c
(a) 12.500000
(b) 12
(c) 12.0
(d) 12.000000
10. The single character input/output functions are
(a) scanf and printf
(b) scanf and putchar
(c) getchar and printf
(d) getchar and putchar
11. What is output of the following program?
main( )
{int x=15,y;
y=(x >5)? 3 : 4;
printf(“%d”,y);
}
(a) 3
(b) 2
(c) 1
(d) 4
12. Output of the following statement is
for (I=0;I<5;I++);
printf(“%d”,I);
(a) 5
(b) 1 2 3 4 5
(c) 1 2 3 4
(d) 0 1 2 3 4
13. All the elements in the array must be
(a) defined
(b) neither initialized nor defined
(c) initialized and defined
(d) initialized
14. How many bytes will be allotted for the declaration int num[4] [3]
(a) 6 bytes
(b) 24 bytes
(c) 12 bytes
(d) 48 bytes
15. Consider the following program fragment.
char c=‘a’;
while(c++<=‘z’)
putchar(xxx);
if the required output is the alphabet sequence from a to z (abc.xyz) the xxx should be
(a) ++c
(b) -c
(c) c
(d) c-1
16. If actual arguments are more than the formal arguments then
(a) a compilation error
(b) extra actual arguments are initialized to zero
(c) extra actual arguments are discarded
(d) extra actual arguments are initialized to garbage values
17. output of the following program is
#include< stdio.h>
main()
{int a,count;
int funct( int count);
for( count=1;count<=5;++count)
{a=funct1(count);
printf(“%d”,a);
}}
int funct1(int x)
{int y;
y= x*x;
return(y);
}
(a) 25 9 16
(b) 36
(c) 1 4 9 16 25
(d) 25
18. In the following C-statement, what is the datatype of d and st respectively.
Printf {“\t%.s\n”, d, st);
(a) character, string
(b) digit, character
(c) string, string
(d) digit, string
19. main()
{} int a;
fun1( ) {} fun2( ) {} To which of the above functions, int a is available to
(a) available to neither of the functions
(b) all functions
(c) only fun1( )
(d) both fun1( ) and fun2 ( )
20. Which of the following is a correct way of defining a symbolic constant pie in C
(a) #define pie 22/7
(b) # define pie = 22/7
(c) # Define pie 22/7
(d) #define pie= 3.142
B D D D B B A D D D A A A B D A C D D A
1. What type of errors are checked during compilation
(a) syntax errors
(b) run - time errors
(c) divide by zero error
(d) logical errors
2. A machine language program consists of instructions written in
(a) keywords
(b) 0’s and 1’s
(c) mnemonics
(d) english like words
3. Which of the following cannot be used as an identifier.
(a) alphabet followed by digit
(b) Library function name
(c) alphabet
(d) Keywords
4. The qualifier that may precede float is
(a) signed
(b) unsigned
(c) Nothing to precede
(d) long
5. If you declare array without the keyword static the elements will be set to
(a) ones
(b) zero
(c) garbage value
(d) null value
6. main( )
{ int a=5; float b=10,c;
c=b%a;
printf(“%f”,c);
}output is——————–
(a) 0.000000
(b) 0.00
(c) gives an error
(d) 2.0
7. In an expression involving ||
||
operator the evaluation
(a) takes place from right to left
(b) takes place from left to right
(c) will be stopped if one of its components evaluates to false
(d) will be stopped if one of its components evaluates to true
8. What is the value of !0?
(a) 1
(b) 00
(c) 0
(d) -1
9. x = 9 - ((12 / 3 ) + 3 * 2 ) - 1 what is the value of x.
(a) 10
(b) 8
(c) -2
(d) 2
10. What is the output for the following program
main( )
{ int m=5,y;
y=++m;
printf(“%d,%d”m,y);
}
(a) 5,5
(b) 5,6
(c) 7,5
(d) 6,6
11. In switch statement
(a) default case, if used, can be placed anywhere
(b) default case must be present
(c) more than one default allowesd
(d) default case, if used, should be the last case
12. What is the output of the following program
main()
{ int a=123;
int r, rev=1;
while (a > 0)
{a=a%10;
rev=rev*10+a;
a=a/10;
}printf(“%d”,rev);
}
(a) 123
(b) 3
(c) 321
(d) 3 0 2 0 1
13. One dimensional array is known as
(a) vector
(b) set
(c) matrix
(d) table
14. An example application for a two dimensional array is
(a) a matrix
(b) an array with 2 elements
(c) an array with 10 elements
(d) two integer variable
15. The NULL character \0 in a string indicates
(a) invalid string
(b) the beginning of string
(c) the end of string
(d) the middle of string
16. Find the C library function from the following
(a) mul()
(b) main()
(c) brazil()
(d) printf()
17. Find the error in the following recursive function, if exists;
fact (m)
{int f =1;
f = m*fact (m-1);
return(f);
}
(a) it results in stack underflow
(b) no error
(c) logic is correct but consumes more CPU time
(d) no termination condition
18. The function is used to find the length of the string
(a) strrsa()
(b) strlen()
(c) strrev()
(d) strcat()
19. The following program
main()
{inc(); inc(); inc();
}inc()
{static int x;
pritnf(“%d”, ++x);
}
(a) Prints three consecutive unpredictable numbers
(b) Prints 0 1 2
(c) Prints 1 2 3
(d) Prints 1 1 1
20. Which of the following is a correct way of defining a symbolic constant pie in C
(a) # Define pie 22/7
(b) #define pie= 3.142
(c) #define pie 22/7
(d) # define pie = 22/7

A B D C C C D A C D A C A A C D D B C C
1. C language has been developed by
(a) Martin Richards
(b) Ken Thompson
(c) Peter Norton
(d) Dennis Ritchie
2. Every executable C program must contain a
(a) main function
(b) printf function
(c) scanf function
(d) scanf, printf and main functions
3. The names of a variables, functions, arrays are known as
(a) identifiers
(b) names
(c) elements
(d) keywords
4. The keyword is used to define a new data type.
(a) union
(b) typedef
(c) array
(d) Structure
5. In C every variable has
(a) a type and size
(b) a type, name, value and size
(c) a name and type
(d) a size and value
6. What is the remainder of 8%10?
(a) 0
(b) 8
(c) 2
(d) 1
7. The operator with lowest priority in the list && , + , | | , < is
(a) | |
(b) +
(c) &&
(d) <
8. main( )
{ int a=0; if(a) printf(“%d”,++a); else printf(“%d”, a+=2) ; } the output is
(a) 1
(b) 0
(c) 3
(d) 2
9. In the expression b=6.6/a+(2*a+(3*c)/a*d)/(2/n); which operation will be performed first?
(a) 3*c
(b) 2*a
(c) 2/n
(d) 6.6/a
10. How would you copy the name “Hello” to a character array (i.e. string) declared as char str[10];
(a) strcat(str,“Hello”);
(b) printf( str, “Hello” );
(c) strcpy( str, “Hello” );
(d) str = “Hello”;
11. In switch (expression) statement, the expression should evaluate to
(a) a character
(b) an integer
(c) a void
(d) a float
12. Which of the following is not correct
(a) while loop is executed atleast once
(b) do . while loop is executed at least once
(c) while loop is executed only if the condition is true
(d) dowhile loop is ececuted only if the condition is true
13. The number of elements in array declaration
(a) dynamically identifies based on largest index used in program
(b) does not require to be specified
(c) assume default size as ‘0’
(d) requires to be specified
14. An array which contains two subscripts, to represent each element is called as
(a) three dimensional
(b) one dimensional
(c) two dimensional
(d) multidimensional
15. printf (“\ “ well done\” ”); what will be the output of this statement
(a) \“well done \”
(b) well done
(c) “ well done”
(d) \ well done \
16. A function can be called in a program
(a) Only three times
(b) Any number of times
(c) Only two times
(d) Only once
17. What is the output of the following program
void main()
{int x = 2;
sqr(x);
printf(“%d”, x);
}sqr(x)
{int y;
y = x * x;
printf (“%d”, y);
}
(a) 4 2
(b) 2 2
(c) 4 4
(d) 2 4
18. What is the use of strcmp( ) function
(a) string comparison
(b) copies one string into another
(c) finds the length of the string
(d) string concatenation
19. What is the output of the following program
main()
{static int y;
printf (“%d\n”, y);
}
(a) 0
(b) run-time error
(c) undefined
(d) compilation error
20. Which of the following is the symbol for preprocessor
(a) $
(b) *
(c) <>
(d) #

D A A B B B A D D C B A D C C B A A A D
1. Representing various steps in a flow diagram is called as
(a) paint
(b) flow chart
(c) program
(d) diagram
2. A machine language program consists of instructions written in
(a) mnemonics
(b) 0’s and 1’s
(c) english like words
(d) keywords
3. The only allowed special character in a variable name is
(a) (under scrore)
(b) :
(c) ,
(d) ;
4. When a variable of data type double is converted into float
(a) truncation takes place
(b) rounding takes place
(c) the higher order bits are dropped
(d) the lower order bits are dropped
5. If you declare array without the keyword static the elements will be set to
(a) garbage value
(b) zero
(c) null value
(d) ones
6. Integer division results in
(a) truncation
(b) overflow
(c) underflow
(d) rounding
7. What is output of following Program?
main( )
{int x=10,y=5,p,q ;
p= x> 9 ;
q= x > 3 && y != 3 ;
printf( “p=%d q=%d ” ,p,q) ;
}
(a) p = 1 q = 1
(b) p =0 q = 0
(c) p = 0 q = 1
(d) p = 1 q= 0
8. The effect of shifting a variable to the left by one bit position is
(a) add it by 2
(b) multiply it by 2
(c) divide it by 2
(d) subtract it by 2
9. The expression, a = 30*1000+2768 evaluates to
(a) 32768
(b) 302768
(c) 13040
(d) -32768
10. Which of the following statements is used to print value of the third element of an integer array called totals
(a) printf (“ % d\n ”, & totals[3] );
(b) printf (“% c\n”, totals[2] );
(c) printf (“% d\n”, totals[3] );
(d) printf (“% d\n”, totals[2] );
11. The switch statement is used to
(a) switch from one variable to other
(b) switch between functions in a program
(c) manipulate switching variables
(d) choose from multiple possibilities
12. Break statement in a loop is used for
(a) de-allocating memory
(b) terminating the program
(c) terminating the loop
(d) terminating the function
13. Data type array-name[size];in the above statement “ size” should be of data type
(a) char
(b) float
(c) int
(d) double
14. An example application for a two dimensional array is
(a) two integer variable
(b) an array with 2 elements
(c) an array with 10 elements
(d) a matrix
15. The input function scanf() can be used with the following format specification to read a string
(a) %c
(b) %f
(c) %d
(d) %s
16. A function can be called in a program
(a) Only three times
(b) Only two times
(c) Any number of times
(d) Only once
17. Consider the program
main()
{int a = 4;
change(a);
printf(“%d”, a);
}change(a){ int a;
printf (“%d” ,++ a);
}The output is
(a) 5 4
(b) 4 4
(c) 4 5
(d) 5 5
18. The string handling function strcmp( ) returns if strings are the same
(a) 1
(b) 0
(c) WRONG
(d) TRUE
19. The register class cannot used for all types of variables. This is because
(a) register variables cannot support arithmetic operations
(b) register variables usage decreases the system performance
(c) number of bits in the register are less than the size of same variable types
(d) register variable precision in less
20. The header file that must be included at the beginning of a C program to use a library function cos is
(a) conio.h
(b) dos.h
(c) stdlib.h
(d) math.h
B B A B A A A B A D D C C D D C A B C D
1. Pseudo code is
(a) language independent code
(b) refined version of program
(c) outcome of compilation process
(d) code developed using the syntax of a specific language
2. In C, comments are placed between
(a) *...... /*
(b) /*......*/
(c) *.....*
(d) //
3. Which of the following is a valid numeric constant
(a) 65432
(b) 20,000
(c) $1000
(d) 15 750
4. The size of operator returns the size of an operand
(a) in float
(b) in bits
(c) in words
(d) in bytes
5. Which of the following is the assignment operator in C
(a) : =
(b) = =
(c) =
(d) !=
6. Which of the following statements will subtract a value of 2 from the variable ‘i’?
(a) i= -2;
(b) i–;
(c) i+=-2;
(d) i- = 2;
7. Which is used in ‘C’ to indicate logical AND
(a) ^
(b) and
(c) &&
(d) &
8. Which of the following comments about the ++ operator is not correct
(a) It can be applied to an expression
(b) The operand can come after the operater
(c) The operand can come before the operator
(d) It is unary operator
9. What is the output of the following statement
int x,y =2,z,a;
x=(y*=2)+(z=a=y);
printf(“%d”,x);
(a) 7
(b) is syntactically wrong
(c) 8
(d) 6
10. Which of the following statements would read a single character from the keyboard and place the result in a character
variable ‘ch’ defined as: char ch;
(a) getkeyb ( ch );
(b) while(!kbhit)
(c) ch = getch( );
(d) printf( “%c”, ch );
11. The keyword ‘else” can be used with
(a) for statement
(b) if statement
(c) do.. while ( ) statement
(d) switch ( ) statement
12. Which of the following statements is false
(a) The expression in the condition part of a for statement can be empty
(b) The initialization part of a for statement cannot have more than one initialization
(c) The body of do-while statement can be empty
(d) The initialization and increment parts of a for statement can be empty
13. Choose the incorrect statements.
(a) The array elements need not be of the same storage class
(b) The number of subscripts determines the dimension of the array
(c) All the elements of the array should be of the same data type and storage class
(d) In an array definition, the subscript can be any expression yielding a non-zero integer value
14. An example application for a two dimensional array is
(a) a matrix
(b) an array with 10 elements
(c) an array with 2 elements
(d) two integer variable
15. main()
{char name[5];
scanf(“%s”,name);
printf(“%s”, name);
}if Program is the given as input, what will be the o/p of the program;
(a) Progr
(b) Runtime error
(c) Prog
(d) program
16. void funct (void)
The above function declaration indicates
(a) it returns a value and had arguments
(b) it returns nothing and had arguments
(c) it returns a value and no arguments
(d) it returns nothing and no arguments
17. How many instance auto variable (f) are created in the execution of the following program. if m = 5.
fact(m)
{int f = 1;
if (m = = 1) return(1);
else
f = m * fact (m-1);
return(f);}
(a) 4
(b) 5
(c) 6
(d) 1
18. Give the output for the following:
# include
main( )
{char arr[10];
int ctr =0;
printf(“Enter a Sting:”);.
gets(arr);
while(arr[ctr]!=\‘0’)
{ctr + + ;
}printf(“%d”,ctr);
}
(a) length of the string only when it is less than 9 characters length
(b) length of the string only when its length is 10 characters
(c) String length
(d) String
19. Give the output of the following program
main()
{int a=10,b=20;
swap(a,b);
printf(“\na=%d b=%d”,a,b);
}swap(int x,int y)
{int t;

t=x;
x=y;
y=t;
printf(“\nx=%d y=%d”,x,y);
}
(a) x=20 y=10
a=10 b=20
(b) x = 20, y = 10
a = 20 b = 10
(c) x=10 y=20
a=20 b=10
(d) x=10 y=10
a=20 b=20
20. The header file that must be included at the beginning of a C program to use a library function cos is
(a) conio.h
(b) stdlib.h
(c) dos.h
(d) math.h

A B A D C D C A C C B B A A C D A C A D

cds online bits

1. Pictorial representation of an algorithms is known as
(a) picture
(b) Flowchart
(c) Diagram
(d) Graphchart
2. In C, comments are placed between
(a) *...... /*
(b) *.....*
(c) /*......*/
(d) //
3. Which of the following cannot be used as an identifier.
(a) Keywords
(b) alphabet
(c) Library function name
(d) alphabet followed by digit
4. Float data type variable occupies bytes in memory
(a) 8
(b) 1
(c) 2
(d) 4
5. In C every variable has
(a) a type and size
(b) a type, name, value and size
(c) a name and type
(d) a size and value
6. The result of 5/2.0 is?
(a) 2.5
(b) 3
(c) 2
(d) 2.49
7. Which is used in ‘C’ to indicate logical AND
(a) ^
(b) &
(c) and
(d) &&
8. Among the following operators which operators has the highest priority
(a) Logical AND
(b) Bitwise OR
(c) Logical OR
(d) Bitwise XOR
9. Compute the result of the following expression in ‘C’. A=3*4/5+10/5+8-1+7/8
(a) 11
(b) 10
(c) 12
(d) 9
10. How would you copy the name “Hello” to a character array (i.e. string) declared as char str[10];
(a) strcpy( str, “Hello” );
(b) strcat(str,“Hello”);
(c) printf( str, “Hello” );
(d) str = “Hello”;
11. Which of the following statement is not true about the switch statement
(a) Character constants are automatically converted into integer
(b) No two case statements have identical constants in the same switch
(c) In switch() case statement nested if can be used
(d) The switch() can evaluate relational or logical expressions
12. count=0;
for ( I=0;I<=10; I++)
{if(I%2==0)
count++;
}printf(“%d”, count);
Pick out the correct value for count.
(a) 6
(b) 3
(c) 4
(d) 5
13. What will happen if you try to put so many values into an array during the initalization such that its size is
exceeded.
(a) Error message from the compiler
(b) Possible system malfunction
(c) Last element data may be overwritten
(d) Nothing
14. consider the array definition
int num [10] = { 3 ,3 ,3 };
pick the correct answers
(a) the value of num[8] is 3
(b) this is invalid if it comes within a function
(c) This is syntactically wrong
(d) the value of num[2] is 3
15. The following function is used to count and return the number of characters in a given string
(a) strlen()
(b) strcat()
(c) strrev()
(d) strcmp()
16. The default return type of a function is
(a) character
(b) float
(c) double
(d) Integer
17. When both called function and calling function are same, then the process is said to be
(a) synchronization
(b) modularity
(c) recursion
(d) Concurrency
18. The function is used to find the length of the string
(a) strrsa()
(b) strrev()
(c) strcat()
(d) strlen()
19. Which of the following is not a storage class
(a) register
(b) external
(c) define
(d) automatic
20. The function sqrt() is part of header file.
(a) iostream.h
(b) stdio.h
(c) conio.h
(d) math.h

B C A D B A D D A A B A A D A D C D C D
1. Pseudo code is
(a) language independent code
(b) code developed using the syntax of a specific language
(c) refined version of program
(d) outcome of compilation process
2. The escape sequence ‘\t0 is a
(a) next column
(b) Tab
(c) Backspace
(d) Nextline
3. In the following which one is not a C keyword?
(a) case
(b) for
(c) volatile
(d) choice
4. To convert a value of one data type to another data type in an expression which of the following is used
(a) casting
(b) user defined types
(c) automactic conversion
(d) type define
5. Which of the following is the assignment operator in C
(a) : =
(b) =
(c) !=
(d) = =
6. Which of the following is shorthand operator for a=a%b
(a) a =%b
(b) a % b
(c) a%=b
(d) a%b=a
7. Which of the following is used in ‘C’ to indicate logical OR
(a) V
(b) U
(c) ||
(d) |
8. The symbol for right shift operator is
(a) <=
(b) >>
(c) >
(d) − >
9. Which of the following arithmetic expression is invalid
(a) 7.5 % 3
(b) 2 + 3/5
(c) 9% -3
(d) -9%3
10. Which of the following statements would read a single character from the keyboard and place the result in a character
variable ‘ch’ defined as: char ch;
(a) ch = getch( );
(b) printf( “%c”, ch );
(c) while(!kbhit)
(d) getkeyb ( ch );
11. The switch statement is used to
(a) manipulate switching variables
(b) switch from one variable to other
(c) choose from multiple possibilities
(d) switch between functions in a program
12. What is the output of the following module
sum=0; I=0;
do{ sum+=I;
I++;
}while(I<=5);
printf(“%d”, sum);
(a) 28
(b) 10
(c) 15
(d) 21
13. The value within the [] brackets in an array declaration specifies
(a) value of the array element
(b) subscript value
(c) address value
(d) size of an array
14. Dynamic memory allocation in array results in
(a) allocation of memory at debugging time
(b) allocation of memory at file saving time
(c) allocation of memory at compile time
(d) allocation of memory at runtime
15. main()
{char name[5];
scanf(“%s”,name);
printf(“%s”, name);
}if Program is the given as input, what will be the o/p of the program;
(a) Progr
(b) Prog
(c) program
(d) Runtime error
16. Any function can be called from any other function. This statement is
(a) true some tines
(b) neither true nor false
(c) false
(d) true
17. Which of the following statements is correct when an array is passed to a called function
(a) function-name ( array-name [ ] )
(b) not possible
(c) function-name ( array-name , size )
(d) function-name ( array-name[size])
18. To find the second string in the first string which of the following string handling functions is used.
(a) str in str()
(b) strstr()
(c) str lwr()
(d) str substr()
19. In case both external and autovariables are declared with the same name in a program, the priority is given to
which of the variables
(a) complier dependent
(b) external variable
(c) auto variable
(d) depends on logic
20. Which of the following is a correct way of defining a symbolic constant pie in C
(a) #define pie 22/7
(b) #define pie= 3.142
(c) # define pie = 22/7
(d) # Define pie 22/7

A B D A B C C B A A C C D D B D C B C A
1. Pictorial representation of an algorithms is known as
(a) picture
(b) Flowchart
(c) Diagram
(d) Graphchart
2. Which function returns single character
(a) scanf
(b) putchar
(c) getchar
(d) printf
3. How many keywords are there in C
(a) 32
(b) 31
(c) 30
(d) 34
4. A short integer occupies normally of memory
(a) three bytes
(b) four bytes
(c) two bytes
(d) single bytes
5. Array elements are stored in
(a) Scattered memory locations
(b) Sequential memory locations
(c) Direct memory locations
(d) Random memory location
6. Which of the following is shorthand operator for a=a%b
(a) a%=b
(b) a =%b
(c) a % b
(d) a%b=a
7. Among the following operators, whose associatively is right to left
(a) bitwise operators
(b) conditional expression
(c) arithmetic operators
(d) logical operators
8. What is the value of the following expression when a=10,b=5
x = b+++a;
(a) 15
(b) error
(c) 17
(d) 16
9. The expression a = 7/22 * (3.14+2) * 3/5 ; evaluates to which value if a is a float type variable
(a) 8.28
(b) 0.00
(c) 6.28
(d) 3.14
10. Consider scanf(“%2d”, &n); and the input data is 3142 then n will be assigned
(a) 31.42
(b) 42
(c) 31
(d) error
11. Which is syntactically correct:
(a) if (a eq 10) {; } else if (a<10) {; }
(b) if (a:=10) {; } else if (a<10) {; }
(c) if (a==10) {; } else if (a<10) {; }
(d) if (a.eq. 10) {; } else if (a<10) {; }
12. Do-while loop is also called as
(a) prefix tested
(b) infix tested
(c) pre-tested
(d) post tested
13. Array elements are stored in
(a) column major order
(b) in diagonal order
(c) row major order
(d) either in row major or column major order
14. Under which of the following conditions,the size of the array need not be specified?
(a) when the compiler is smart
(b) when it is a formal parameter
(c) when initialization is a part of definition
(d) when it is a declaration
15. Find the output of the following program
main()
{ char name1 [4] = ‘R’, ‘A’, ‘V’, ‘I’;
char name2 [5] = ‘R’,‘A’,‘V’,‘I’;
printf (“%s”, name1);
printf (“%s”, name 2);
}
(a) RAVI RAVI
(b) RAVI garbage value
RAVI
(c) RAVI
garbage value
(d) Garbage value
RAVI
16. Which of the following is TRUE
A Function
(a) returns only vector values
(b) returns only scalar values
(c) returns both scalar and vector values
(d) returns any number of values
17. What is the output of the following program?
main()
{int x , y;
x = 10; y = 100;
change (x,y)
printf (“%d, %d”, x,y);
}change (
int x, int y);
{int k;
k = a; a = b; b = k;
}
(a) 100, 100
(b) 10, 10
(c) 100, 10
(d) 10, 100
18. If s1=“abc” s2=“def” s3=“ghi” then the returned value of strcat(strcat(s1,s2),s3) is
(a) abcghi
(b) ghidefabe
(c) abcdefghi
(d) abcdef
19. External variables are declared
(a) in any function, with a profix key word “external”
(b) in first level user defined functions
(c) in main() function
(d) outside the function body
20. #include is a directive
(a) processor
(b) pre-compiler
(c) pre-processor
(d) complier

B C A C B A B A B C C D D C B C D C D C
1. The process of repeating a group of statements in an algorithm is known as
(a) flow
(b) selection
(c) sequence
(d) iteration
2. Which keyword is used for is normal exit from a function.
(a) close
(b) eof (0)
(c) exit
(d) return
3. Which of the following is not a key word of C?
(a) const
(b) main
(c) void
(d) sizeof
4. Which of the following is a scalar data type used in ‘C’
(a) union
(b) array
(c) structure
(d) double
5. The purpose of the following fragment
B=S+B
S=B-S;
B=B-S;
Where S,B are two integers is to
(a) swap the contents of S and B
(b) transfer the contents of S to B
(c) transfer the contents of B to S
(d) negate the contents of S and B
6. Output of printf(“%f”,3/4) is———
(a) 0.00
(b) gives an error
(c) 0.75
(d) 0
7. What is output of following Program?
main( )
{int x=10,y=5,p,q ;
p= x> 9 ;
q= x > 3 && y != 3 ;
printf( “p=%d q=%d ” ,p,q) ;
}
(a) p = 1 q= 0
(b) p = 0 q = 1
(c) p =0 q = 0
(d) p = 1 q = 1
8. Among the following operators which operators has the highest priority
(a) Bitwise XOR
(b) Bitwise OR
(c) Logical OR
(d) Logical AND
9. x=9-12/3+3*2-1, what is the value of x
(a) 2
(b) 4
(c) -10
(d) 10
10. Which of the following statements is used to read a string of characters into the array words.
(a) scanf(“%d”, words);
(b) scanf(”% s\n”, words);
(c) scanf(“%s”, words);
(d) scanf(“ %c”, words);
11. If statement is a —————statement
(a) one-way decision
(b) multiway decision
(c) two way decision
(d) loop construct
12. Break statement in a loop is used for
(a) terminating the loop
(b) de-allocating memory
(c) terminating the program
(d) terminating the function
13. Array elements are stored in
(a) scattered memory locations
(b) sequential memory locations
(c) direct memory locations
(d) indirect memory locations
14. Dynamic memory allocation in array results in
(a) allocation of memory at runtime
(b) allocation of memory at debugging time
(c) allocation of memory at compile time
(d) allocation of memory at file saving time
15. A string constant is one dimensional array of charecters terminated by a
(a) comma
(b) fullstop
(c) semicolan
(d) null character (‘\00)
16. main() is
(a) friendly function
(b) member function
(c) library function
(d) user defined function
17. When a function is recursively called, all automatic variables are
(a) stored in a list
(b) stored in a stack
(c) stored in an array
(d) stored in queue
18. A function strcat() will take
(a) 3 arguments
(b) 2 arguments
(c) zero arguments
(d) 1 argument
19. Which of the following statement is wrong with respect to a storage class
(a) by defualt a storage class is static
(b) it specifies the defualt initial value
(c) if specifies where variable is stored
(d) it specifies the life of a variable
20. The header file that must be included at the beginning of a C program to use a library function cos is
(a) stdlib.h
(b) conio.h
(c) dos.h
(d) math.h

D D B D A A D A D C C A B A D D B B A D
1. The process of repeating a group of statements in an algorithm is known as
(a) flow
(b) selection
(c) sequence
(d) iteration
2. Which function returns single character
(a) putchar
(b) scanf
(c) printf
(d) getchar
3. Which of the following is not a keyword
(a) register
(b) enum
(c) storage
(d) signed
4. The size of all the below datatypes is identical except the one. Identify the odd one
(a) unsigned long
(b) double
(c) long
(d) float
5. The minimum number of temporary variable needed to swap the contents of two variable is
(a) 2
(b) 1
(c) 0
(d) 3
6. The value of the following expression a++ + a if the variable a has a initial value of 5 is
(a) 10
(b) 12
(c) 11
(d) 9
7. In an expression involving ||
||
operator the evaluation
(a) will be stopped if one of its components evaluates to true
(b) takes place from right to left
(c) will be stopped if one of its components evaluates to false
(d) takes place from left to right
8. main( )
{int m=7,y;
y=m++;
printf(“y=%dm=%d”,y,m);
y=–m;
printf(“y=%dm=%d”,y,m);
}output is———–
(a) y=7,m=8,y=6,m=7
(b) y=7,m=8,y=6,m=6
(c) y=7,m=8,y=7,m=7
(d) y=7,m=7,y=6,m=6
9. Compute the result of the following expression in ‘C’. A=3*4/5+10/5+8-1+7/8
(a) 12
(b) 11
(c) 10
(d) 9
10. The single character input/output functions are
(a) getchar and printf
(b) scanf and printf
(c) scanf and putchar
(d) getchar and putchar
11. The keyword ‘else” can be used with
(a) for statement
(b) do.. while ( ) statement
(c) if statement
(d) switch ( ) statement
12. The while loop is terminated when the conditional expression returns
(a) 1
(b) 2
(c) 3
(d) zero
13. All the elements in the array must be
(a) initialized and defined
(b) neither initialized nor defined
(c) defined
(d) initialized
14. If we don’t initialize a static array, what will be the elements set to:
(a) character constant
(b) 0
(c) an undetermined value
(d) a floating point number
15. The NULL character \0 in a string indicates
(a) the end of string
(b) invalid string
(c) the beginning of string
(d) the middle of string
16. int cal sum(int a, int b);
In the above, int at the beginning indicates
(a) name of function
(b) return type of function
(c) both function arguments are integer
(d) received type of function
17. Arrays are passed as arguments to a function by
(a) context
(b) value
(c) reference
(d) both value and reference
18. What will be the output of the following program
#include
main()
{int x;
x=‘d‘ *5 + 20;
printf(“%d”,x);
}
(a) runtime error
(b) 520
(c) compile time error
(d) 20
19. If you don’t initialize a static array, what will be the elements set to
(a) 0
(b) the character constant ‘ø’
(c) a floating point number
(d) an undetermined value
20. Which of the following is a correct way of defining a symbolic constant pie in C
(a) # Define pie 22/7
(b) #define pie 22/7
(c) #define pie= 3.142
(d) # define pie = 22/7
D D C B C C A C B D C D C B A B C B A B
1. What is the appropriate order of refinement in a problem solving.
(a) pseudo code, flowchart, program
(b) program, flow chart, pseudo code
(c) flow chart, program, pseudo code
(d) flow chart, pseudo code program
2. A machine language program consists of instructions written in
(a) english like words
(b) keywords
(c) mnemonics
(d) 0’s and 1’s
3. Which of the following cannot be used as an identifier.
(a) alphabet followed by digit
(b) Library function name
(c) alphabet
(d) Keywords
4. A short integer occupies normally of memory
(a) three bytes
(b) four bytes
(c) single bytes
(d) two bytes
5. In the following, which is not valid character constant ?
(a) “#”
(b) ‘B’
(c) ‘2’
(d) ‘#’
6. Which of the following statements will subtract a value of 2 from the variable ‘i’?
(a) i+=-2;
(b) i= -2;
(c) i–;
(d) i- = 2;
7. Identify the logical operator from the following:
(a) !
(b) _
(c) = =
(d) !=
8. In the following, which is bitwise operator?
(a) *
(b) >
(c) <
(d) |
9. Which of the following arithmetic expression is invalid
(a) -9%3
(b) 7.5 % 3
(c) 2 + 3/5
(d) 9% -3
10. What is the output for the following program
main( )
{ int m=5,y;
y=++m;
printf(“%d,%d”m,y);
}
(a) 7,5
(b) 5,6
(c) 6,6
(d) 5,5
11. Identify the wrong statement:
(a) if (a(b) if (a(c) if a(d) if (a >b) {; ; }
12. Which of the following statements is false
(a) The expression in the condition part of a for statement can be empty
(b) The initialization and increment parts of a for statement can be empty
(c) The body of do-while statement can be empty
(d) The initialization part of a for statement cannot have more than one initialization
13. One dimensional array is known as
(a) matrix
(b) vector
(c) set
(d) table
14. Under which of the following conditions,the size of the array need not be specified?
(a) when initialization is a part of definition
(b) when the compiler is smart
(c) when it is a declaration
(d) when it is a formal parameter
15. What is the input function for reading a strings
(a) getche()
(b) getch()
(c) gets()
(d) getchar()
16. A function can return only value
(a) three
(b) zero
(c) one
(d) two
17. How many instance auto variable (f) are created in the execution of the following program. if m = 5.
fact(m)
{int f = 1;
if (m = = 1) return(1);
else
f = m * fact (m-1);
return(f);}
(a) 6
(b) 5
(c) 4
(d) 1
18. Consider the following program
main()
{ char str[10]; scanf(“%s”,str); printf(“%s”,str); } The error in the above program is
(a) memery has not been allocated for the variable str
(b) the parameter str to scanf is passed by value, it should be a address
(c) the format control for the string variable is not %s
(d) no error in the program
19. External variables are active
(a) only within the function where it is declared using the qualifier extern
(b) throughout the program
(c) only within some functions
(d) only with in main functions and functions with in main functions
20. Which of the following is a correct way of defining a symbolic constant pie in C
(a) #define pie= 3.142
(b) # Define pie 22/7
(c) # define pie = 22/7
(d) #define pie 22/7
D D D D A D A D B C C D B A C C C D B D
1. Representing various steps in a flow diagram is called as
(a) program
(b) paint
(c) flow chart
(d) diagram
2. The escape sequence ‘\t0 is a
(a) next column
(b) Nextline
(c) Tab
(d) Backspace
3. The only allowed special character in a variable name is
(a) ;
(b) (under scrore)
(c) ,
(d) :
4. Which data type is used to represent string literals
(a) Character
(b) Integer
(c) Void
(d) Float
5. The real constant in C can be expressed in which of the following forms
(a) fractions form only
(b) both fractional and Exponential
(c) exponential form only
(d) ASCII form only
6. Number of binary arithmetic operators in C is:
(a) 4
(b) 7
(c) 6
(d) 5
7. Which is used in ‘C’ to indicate logical AND
(a) &
(b) ^
(c) and
(d) &&
8. int x=1,y=5;
x=++x + –y;
what is the value of x
(a) 7
(b) 8
(c) 6
(d) 5
9. int C;
C=25/2; What is the value of C
(a) 12.000000
(b) 12
(c) 12.500000
(d) 0.5
10. The output of the statement printf(“%d”,0xDC ) is
(a) 420
(b) 320
(c) 120
(d) 220
11. Which of the following statement is not true about the switch statement
(a) Character constants are automatically converted into integer
(b) No two case statements have identical constants in the same switch
(c) The switch() can evaluate relational or logical expressions
(d) In switch() case statement nested if can be used
12. Which of the following is not correct
(a) while loop is executed only if the condition is true
(b) do . while loop is executed at least once
(c) while loop is executed atleast once
(d) dowhile loop is ececuted only if the condition is true
13. Output of the below program
#include
main()
{int a,b=0;
int c[10]={1,2,3,4,5,6,7,8,9,0 };
for(a=0;a<10;++a)
b+=c[a];
printf(“%d”,b);
}
(a) 0
(b) 55
(c) 45
(d) 1 3 6 10 15 21 28 32 45 45
14. The maximum number of dimension an array can have in C language is
(a) compiler dependent
(b) 4
(c) 5
(d) 3
15. A character array is terminated internally with
(a) (space)
(b) ‘\0’
(c) 0
(d) ;
16. Find the C library function from the following
(a) brazil()
(b) main()
(c) printf()
(d) mul()
17. ‘C’ language by default allows
(a) call by name
(b) call by pointer
(c) call by value
(d) call by reference
18. What is the use of strcmp( ) function
(a) string concatenation
(b) finds the length of the string
(c) string comparison
(d) copies one string into another
19. Variables declared using the register storage class are created in
(a) hard disk
(b) ROM
(c) processor registers
(d) RAM
20. Symbolic constants are defined as
(a) #define s1 s2
(b) #define s1=s2;
(c) #define s1 s2;
(d) #define s1=s2

C C B A B D D C B D B C C A B C C C C A

jntu cds online bits

1. What is the appropriate order of refinement in a problem solving.
(a) pseudo code, flowchart, program
(b) flow chart, program, pseudo code
(c) program, flow chart, pseudo code
(d) flow chart, pseudo code program
2. A machine language program consists of instructions written in
(a) mnemonics
(b) english like words
(c) keywords
(d) 0’s and 1’s
3. Which of the following is not a keyword
(a) register
(b) enum
(c) signed
(d) storage
4. Size of (double) returns———
(a) 2
(b) 8
(c) 10
(d) 4
5. Array elements are stored in
(a) Scattered memory locations
(b) Random memory location
(c) Direct memory locations
(d) Sequential memory locations
6. Which of the following is shorthand operator for a=a%b
(a) a % b
(b) a%b=a
(c) a%=b
(d) a =%b
7. && and || are which kind of operators.
(a) Relational
(b) Logical
(c) Conditional
(d) Arithmetic
8. The symbol for one’s complement operator is:
(a) |
(b) ^
(c) &
(d) _
9. The operation between integer and float always yield result in
(a) character
(b) float
(c) constant
(d) Integer
10. The single character input/output functions are
(a) getchar and printf
(b) scanf and printf
(c) scanf and putchar
(d) getchar and putchar
11. The conditional operators “ ? :” is similar to
(a) if-then-else
(b) do-while
(c) while
(d) nested if
12. Which one of the following is not a loop control structure.
(a) do-while
(b) if
(c) For
(d) while
13. The value within the [] brackets in an array declaration specifies
(a) subscript value
(b) value of the array element
(c) size of an array
(d) address value
14. An array which contains two subscripts, to represent each element is called as
(a) two dimensional
(b) one dimensional
(c) three dimensional
(d) multidimensional
15. Literal means
(a) A string constant
(b) An alphabet
(c) A character
(d) A string
16. Any function can be called from any other function. This statement is
(a) neither true nor false
(b) true
(c) false
(d) true some tines
17. Arrays are passed as arguments to a function by
(a) context
(b) both value and reference
(c) reference
(d) value
18. In the following C-statement, what is the datatype of d and st respectively.
Printf {“\t%.s\n”, d, st);
(a) character, string
(b) digit, string
(c) string, string
(d) digit, character
19. The register class cannot used for all types of variables. This is because
(a) register variables usage decreases the system performance
(b) register variable precision in less
(c) number of bits in the register are less than the size of same variable types
(d) register variables cannot support arithmetic operations
20. Which of the following is a correct way of defining a symbolic constant pie in C
(a) # Define pie 22/7
(b) #define pie 22/7
(c) # define pie = 22/7
(d) #define pie= 3.142
D D D B D C B D B D A B C A A B C B C B
1. A compiler compiles the source code
(a) based on language
(b) one line at a time
(c) Complete program at a time
(d) two lines at a time
2. A machine language program consists of instructions written in
(a) keywords
(b) 0’s and 1’s
(c) mnemonics
(d) english like words
3. Among the following which is not a C token
(a) identifiers
(b) comment
(c) constants
(d) strings
4. The keyword is used to define a new data type.
(a) Structure
(b) union
(c) typedef
(d) array
5. C variable cannot start with
(a) an underscore
(b) a number
(c) an upper case letter
(d) a lower case
6. The value of 2%5 is
(a) 0
(b) 3
(c) 2
(d) 10
7. How many logical operators C provides?
(a) 3
(b) 2
(c) 4
(d) 1
8. Which of the following operators is used as a bit wise operator in C
(a) *
(b) <
(c) &
(d) %
9. The operation between integer and float always yield result in
(a) Integer
(b) float
(c) constant
(d) character
10. Which of the following statements is used to print value of the third element of an integer array called totals
(a) printf (“% c\n”, totals[2] );
(b) printf (“% d\n”, totals[3] );
(c) printf (“ % d\n ”, & totals[3] );
(d) printf (“% d\n”, totals[2] );
11. If statement is a —————statement
(a) loop construct
(b) two way decision
(c) multiway decision
(d) one-way decision
12. Identify the loop construct:
(a) goto
(b) if-else
(c) while
(d) switch-case
13. The total memory required for an array
(a) sizeof (datatype) * 2
(b) size of (datatype) * size of used array elements
(c) sizeof (datatype) * sizeof array
(d) size of (array) * datatype
14. int table [2][3] ={{0}, {0}} in this statement
(a) none of the element are initialized to zero
(b) only first row elements are initialized to zero
(c) only last row elements are initialized to zero
(d) all the array elements are initialized to zero
15. The statements that prints out the character set from A-Z is, where a is an integer variable
(a) for(a=‘A’; a<=‘z’, a++) printf(“%c”; a);
(b) for(a=‘A’; a<=‘z’, a++) printf(“%c”; a);
(c) for(a=‘a’; a<=‘z’, a++) printf(“%c”; a);
(d) for(a=’A’ a<=‘Z’, a++) printf(“%c”; a);
16. The names of actual parameters and formal parameters
(a) always same
(b) should be same
(c) need not be same
(d) almost same
17. ‘C’ language by default allows
(a) call by value
(b) call by pointer
(c) call by name
(d) call by reference
18. What will be the output of the following program?
void main()
{char txt[ ]
=

ABC\0DEF”;
printf(“%s %d”, txt, sizeof (txt));
}
(a) ABC\0DEF 7
(b) ABCDEF 8
(c) ABC 4
(d) ABC 8
19. The following program
main()
{inc(); inc(); inc();
}inc()
{static int x;
pritnf(“%d”, ++x);
}
(a) Prints 1 2 3
(b) Prints 0 1 2
(c) Prints three consecutive unpredictable numbers
(d) Prints 1 1 1
20. The header file that must be included at the beginning of a C program to use a library function cos is
(a) math.h
(b) conio.h
(c) dos.h
(d) stdlib.h
C B B C B C A C B D B C C D D C A D A A
1. The error in a program is called
(a) flow
(b) virus
(c) bug
(d) vaccine
2. The character which is used as a statement terminator in a ‘C’ program is
(a) ,
(b) .
(c) ;
(d) :
3. Which of the following is a valid ‘C’ variable name ?
(a) none
(b) $comp
(c) 4compute
(d) 173comp
4. To convert a value of one data type to another data type in an expression which of the following is used
(a) type define
(b) casting
(c) automactic conversion
(d) user defined types
5. Array elements are stored in
(a) Direct memory locations
(b) Sequential memory locations
(c) Scattered memory locations
(d) Random memory location
6. Associativity of arithmetic operators is from
(a) middle to right
(b) right to left
(c) left to right
(d) middle to left
7. Which of the following is used in ‘C’ to indicate logical OR
(a) ||
(b) U
(c) V
(d) |
8. The symbol for exclusive OR operator is:
(a) ^
(b) |
(c) &
(d) _
9. x = 9 - ((12 / 3 ) + 3 * 2 ) - 1 what is the value of x.
(a) 10
(b) 8
(c) -2
(d) 2
10. Which of the following statements would read a single character from the keyboard and place the result in a character
variable ‘ch’ defined as: char ch;
(a) getkeyb ( ch );
(b) printf( “%c”, ch );
(c) while(!kbhit)
(d) ch = getch( );
11. Which one of the following is not a loop control structure.
(a) while
(b) do-while
(c) if
(d) for
12. while(++I <=n);
what is the value of I when the loop completes, if the initial value of I is 1.
(a) n+2
(b) n
(c) n-1
(d) n+1
13. Elements of a string are accessed by a number called as
(a) index
(b) coordinate
(c) label
(d) pointer
14. Dynamic memory allocation in array results in
(a) allocation of memory at file saving time
(b) allocation of memory at compile time
(c) allocation of memory at debugging time
(d) allocation of memory at runtime
15. Which function is used to convert a string of digits into their integer values
(a) atoi
(b) btoi
(c) asctoint
(d) itoa
16. Local variable declared in the ‘main function’ can be used
(a) by the main function only
(b) by a any function as part of the program
(c) by main function and the functions called in it
(d) any where in the program
17. Which of the following statements is correct when an array is passed to a called function
(a) not possible
(b) function-name ( array-name , size )
(c) function-name ( array-name[size])
(d) function-name ( array-name [ ] )
18. What will be the output of the following program
void main ()
{char txt[ ]
=

12345\0
abcdef”;
printf (“%s”, txt);
}
(a) abcdef
(b) 12345
(c) 12345 abcdef
(d) 12345 \ 0abcdef
19. The address operator cannot be applied to variable
(a) static
(b) global
(c) register
(d) auto
20. The header file that must be included at the beginning of a C program to use a library function cos is
(a) math.h
(b) stdlib.h
(c) dos.h
(d) conio.h
C C A B B C A A C D C D A D A A B B C A
1. Pseudo code is
(a) outcome of compilation process
(b) code developed using the syntax of a specific language
(c) refined version of program
(d) language independent code
2. The ANSI C standard recognizes maximum length of a variable up to
(a) 31 characters
(b) unlimited characters
(c) 15 characters
(d) 8 characters
3. The only allowed special character in a variable name is
(a) (under scrore)
(b) ;
(c) ,
(d) :
4. What is the size of long double variable
(a) 16 bytes
(b) 4 bytes
(c) 10 bytes
(d) 8 bytes
5. The declaration of a variable should be done
(a) before using it
(b) after using it
(c) only in the calling program
(d) at the time of using
6. Output of printf(“%f”,3/4) is———
(a) 0.00
(b) gives an error
(c) 0.75
(d) 0
7. Which of the following has highest precedence
(a) ==
(b) +
(c) <
(d) &&
8. Hierarchy decides which operator
(a) operates on large number
(b) consumes more CPU time
(c) is most important
(d) is used first
9. If y is of integer type variable then the two expressions.
3*(y-8)/9 and (y-8)/9*3 yield the same value if
(a) y-8 is an integer multiple of 9
(b) y is an odd number
(c) y is an even number
(d) y-8 is an integer multiple of 3
10. What is the output of the following program
main( )
{ int a=5, i=1; while(i++ (a) 4,3,2,1
(b) 1 1 1 1 1
(c) 5 5 5 5 5
(d) 5,4,3,2,1
11. Which of the following statement is not true about the switch statement
(a) Character constants are automatically converted into integer
(b) No two case statements have identical constants in the same switch
(c) The switch() can evaluate relational or logical expressions
(d) In switch() case statement nested if can be used
12. Output of the following statement is
for (I=0;I<5;I++);
printf(“%d”,I);
(a) 1 2 3 4 5
(b) 5
(c) 1 2 3 4
(d) 0 1 2 3 4
13. Findout which of following is correct array declaraion
(a) int num(25);
(b) int array num[25];
(c) int num[25];
(d) num[25];
14. An array which contains two subscripts, to represent each element is called as
(a) two dimensional
(b) three dimensional
(c) multidimensional
(d) one dimensional
15. What is the control string for representing string
(a) %c
(b) %s
(c) %d
(d) %f
16. A function can be called in a program
(a) Only two times
(b) Only once
(c) Any number of times
(d) Only three times
17. When you pass an array as an argument to a function, what actually gets passed
(a) Address of the array
(b) Values of the elements of the array
(c) Number of elements of the array
(d) Address of the last element of the array
18. What will be the output of the following program?
void main()
{char x[ ]
=
{‘s’, ‘
a’, NULL };
printf (“\n %d”, sizeof (x));
}
(a) 1
(b) 2
(c) 3
(d) 0
19. What is the output of the following program
main()
{static int y;
printf (“%d\n”, y);
}
(a) 0
(b) undefined
(c) compilation error
(d) run-time error
20. #directive must be present
(a) before the main function
(b) any where in the program body
(c) at the end of the program
(d) after the main function
D A A C A A B D A C B B C A B C A C A A
1. The step by step description of a process is called as
(a) flowchart
(b) algorithm
(c) pseudo code
(d) program
2. The constant ‘\00 is called as
(a) nill
(b) full
(c) null
(d) zero
3. Which of the following is not a valid name for a C variable
(a) Hello There
(b) HelloThere
(c) Hellothere
(d) HELLO THERE
4. A character variable can at a time store
(a) a string of 254 characters
(b) 1 character
(c) 2 character
(d) 8 character
5. How many variables of the same type can be initialized at a time with the same value
(a) One
(b) Two
(c) any number of variables
(d) Three
6. What is output of following program ?
main( )
{int x;
x= 4 + 2 % 8;
printf(“%d”,x);
}
(a) 6
(b) -6
(c) 4.25
(d) 4
7. The equality relational operator is represent by
(a) =
(b) :=
(c) .EQ.
(d) ==
8. Among the following operators which operators has the highest priority
(a) Logical OR
(b) Bitwise OR
(c) Logical AND
(d) Bitwise XOR
9. x=9-12/3+3*2-1, what is the value of x
(a) 4
(b) -10
(c) 2
(d) 10
10. The output of the statement printf(“%d”,0xDC ) is
(a) 420
(b) 320
(c) 120
(d) 220
11. switch(ch)
{case ‘a’: printf(“a”);
case ‘b’: printf(“b”);
default: printf(“error”);
} if ch is assigned to the character ‘a’ then the output will be
(a) a
(b) a b error
(c) error
(d) a b
12. count=0;
for ( I=0;I<=10; I++)
{if(I%2==0)
count++;
}printf(“%d”, count);
Pick out the correct value for count.
(a) 4
(b) 6
(c) 3
(d) 5
13. C does no automatic array bound checking. This is
(a) false
(b) Neither advantage nor disadvantage
(c) Disadvantage of C
(d) Advantage of C
14. The number of elements in the array a[10][5] is
(a) 15
(b) 40
(c) 50
(d) 45
15. A string in the ‘C’ language is represented by enclosing a sequence of characters in
(a) double quotes
(b) flower brackets
(c) parenthesis
(d) single quotes
16. The statement used to send back any value to the calling function is
(a) break
(b) continue
(c) exit
(d) return
17. What is the output of
main()
{int x, change (int);
x = 20;
change (x);
printf (“%d”, x);
return 0;
}change (
int x);
{x = 10;
printf (“%d”. x);
}
(a) 20 20
(b) 10 20
(c) 10 10
(d) 10 30
18. What is the type that strlen() funtion will return
(a) float
(b) int
(c) char
(d) long int
19. The global variable can be declared
(a) within block
(b) before main
(c) after main
(d) after block
20. Which of these complier directives access to the print function
(a) #include conio.h;
(b) #include
(c) #define print
(d) include stdio.h;
B C A B C A D D D D B B C C A D B B B B
1. The symbol with rounded ends is used to represent
(a) start/ stop
(b) equation processing
(c) decision making
(d) input/output
2. The function getchar( ) is used to read
(a) a character
(b) a word
(c) a string
(d) a boolean value
3. What are the smallest individual units in a program
(a) Tokens
(b) Structures
(c) Functions
(d) record
4. What is the range of unsigned char data type
(a) 0 to 255
(b) -128 to 127
(c) -32, 768 to 32,767
(d) 0 to 512
5. Which of the following would you use to declare a character array called str large enough to fit the word HELLO
(a) char str[3]
(b) char str[6]
(c) string str;
(d) char str[5]
6. The operator ++ is called as operator
(a) increment
(b) double addition
(c) special increment
(d) decrement
7. In an expression involving ||
||
operator the evaluation
(a) takes place from left to right
(b) will be stopped if one of its components evaluates to false
(c) will be stopped if one of its components evaluates to true
(d) takes place from right to left
8. The effect of shifting a variable to the left by one bit position is
(a) divide it by 2
(b) multiply it by 2
(c) add it by 2
(d) subtract it by 2
9. Which of the following shows the correct hierarchy of arithmetic operations in C
(a) ( ), / or *, - or +
(b) ( ),&&,*or / + or -;
(c) ( ), &&, *,/,+,-
(d) ( ), &&, / , *, +, -
10. Consider the segment
If(1) printf(“yes”);
else printf(“no”);
what will be the output
(a) yes
(b) Unpredictable
(c) Error
(d) no
11. Which of the following statement is not true about the switch statement
(a) Character constants are automatically converted into integer
(b) In switch() case statement nested if can be used
(c) No two case statements have identical constants in the same switch
(d) The switch() can evaluate relational or logical expressions
12. The minimum number of times the for loop is executed is
(a) 0
(b) 1
(c) cannot be predicted
(d) 2
13. The amount of storage required for holding elements of the array depends on
(a) data type
(b) datatype and size
(c) run-time requirement
(d) size
14. If we don’t initialize a static array, what will be the elements set to:
(a) character constant
(b) a floating point number
(c) 0
(d) an undetermined value
15. printf (“\ “ well done\” ”); what will be the output of this statement
(a) “ well done”
(b) \“well done \”
(c) well done
(d) \ well done \
16. The statement used to send back any value to the calling function is
(a) return
(b) continue
(c) break
(d) exit
17. When a function is recursively called, all automatic variables are
(a) stored in an array
(b) stored in a stack
(c) stored in queue
(d) stored in a list
18. What is wrong with the following program
main() { char m1[9]= “message1”; char m2[9]=“message2”; m2=m1;
printf(“msg is %s”,m2); }
(a) char array cannot be printed directly using printf
(b) array is not a left value and so cannot be assigned to
(c) program compiles without error, but prints an unpredictable value
(d) array cannot be initialized as above
19. Variables declared using the register storage class are created in
(a) ROM
(b) hard disk
(c) processor registers
(d) RAM
20. The function sqrt() is part of header file.
(a) conio.h
(b) stdio.h
(c) math.h
(d) iostream.h

A A A A B A C B A A C A B C A A B B C C

1. A compiler compiles the source code
(a) based on language
(b) one line at a time
(c) Complete program at a time
(d) two lines at a time
2. A machine language program consists of instructions written in
(a) 0’s and 1’s
(b) keywords
(c) mnemonics
(d) english like words
3. Among the following which is not a C token
(a) identifiers
(b) comment
(c) strings
(d) constants
4. Range of long int is
(a) -216 to 216 - 1
(b) -231 to 231
(c) -216 to 216
(d) -231 to 231 - 1
5. The real constant in C can be expressed in which of the following forms
(a) ASCII form only
(b) both fractional and Exponential
(c) fractions form only
(d) exponential form only
6. Addition of two numbers is performed using
(a) logical operators
(b) conditional operators
(c) relational operators
(d) arithmetic operators
7. Which of the following is used in ‘C’ to indicate logical OR
(a) U
(b) ||
(c) V
(d) |
8. The symbol for exclusive OR operator is:
(a) _
(b) |
(c) &
(d) ^
9. What is the result of the expression ( 10/3 )*3+5%3 ?
(a) 10
(b) 11
(c) 8
(d) 1
10. What is the output of the following program
Main( )
{ float a;
int x = 6; y = 4;
a = x/y;
print (“%f”,a)
}
(a) 2.0
(b) 1.00
(c) error
(d) 1.5
11. Which one of the following is not a loop control structure.
(a) while
(b) if
(c) do-while
(d) for
12. Identify the loop control structure
(a) if-else
(b) switch
(c) goto
(d) while
13. Array subscripts in ‘C’ always start at
(a) 0
(b) compiler dependent
(c) 1
(d) -1
14. The maximum number of dimension an array can have in C language is
(a) 4
(b) 5
(c) compiler dependent
(d) 3
15. The following function is used to count and return the number of characters in a given string
(a) strcmp()
(b) strlen()
(c) strrev()
(d) strcat()
16. The parameters in a function definition are
(a) real parameters
(b) formal parameters
(c) actual parameters
(d) dummy parameters
17. Which of the following cannot be passed to a function
(a) a constant
(b) a function
(c) a structure
(d) an expression
18. What is the use of the strlen( ) function
(a) string comparison
(b) copies one string into another
(c) finds the length of the string
(d) string concatenation
19. main()
{} int a;
fun1( ) {} fun2( ) {} To which of the above functions, int a is available to
(a) all functions
(b) only fun1( )
(c) both fun1( ) and fun2 ( )
(d) available to neither of the functions
20. Which of the following is a correct way of defining a symbolic constant pie in C
(a) # Define pie 22/7
(b) #define pie= 3.142
(c) # define pie = 22/7
(d) #define pie 22/7
C A B D B D B D B B B D A C B B D C C D
1. What type of errors are checked during compilation
(a) syntax errors
(b) divide by zero error
(c) run - time errors
(d) logical errors
2. The constant ‘\b0 is used for
(a) backspace
(b) tab
(c) bell
(d) vertical blank
3. Which of the following is an incorrect variable name.
(a) else
(b) name
(c) string
(d) age
4. The keyword is used to define a new data type.
(a) union
(b) array
(c) Structure
(d) typedef
5. Which of the following is the assignment operator in C
(a) = =
(b) !=
(c) =
(d) : =
6. What is the result of the expression 15%-2
(a) 0
(b) -1
(c) 1
(d) 7
7. Identify the relational operator in C
(a) !
(b) &&
(c) <
(d) ||
8. The symbol for left shift operator is:
(a) <<<
(b) <<
(c) <=
(d) <
9. In the expression b=6.6/a+(2*a+(3*c)/a*d)/(2/n); which operation will be performed first?
(a) 3*c
(b) 2/n
(c) 6.6/a
(d) 2*a
10. Consider scanf(“%2d”, &n); and the input data is 3142 then n will be assigned
(a) 42
(b) 31.42
(c) error
(d) 31
11. Which of the following statement is not true about the switch statement
(a) In switch() case statement nested if can be used
(b) Character constants are automatically converted into integer
(c) The switch() can evaluate relational or logical expressions
(d) No two case statements have identical constants in the same switch
12. The minimum number of times the for loop is executed is
(a) 0
(b) 1
(c) cannot be predicted
(d) 2
13. C does no automatic array bound checking. This is
(a) Neither advantage nor disadvantage
(b) Advantage of C
(c) false
(d) Disadvantage of C
14. In a multidimensional array with initialization
(a) the right most dimension may be omitted
(b) no demension must be omitted
(c) both leftmost and right most may be omitted
(d) the left most dimension may be omitted
15. The following program fragment
int m,n,b; char wer[80]; m=n=b=8;
sprintf(wer,“%d%d%d”,m,n,b);
puts(wer);
(a) prints the string 8 8 8
(b) prints the string 888
(c) prints 888 888 888
(d) prints the null string
16. A function is one that returns no value.
(a) void
(b) Integer
(c) float
(d) recursive
17. What is the output of the following program
void main()
{int x = 2;
sqr(x);
printf(“%d”, x);
}sqr(x)
{int y;
y = x * x;
printf (“%d”, y);
}
(a) 4 4
(b) 2 2
(c) 2 4
(d) 4 2
18. If the first string and the second string both are identical, then strcmp function returns
(a) any positive integer
(b) a value of 1
(c) either 1 or 0
(d) a value of 0
19. int a[10];
What a represents in the following declaration
(a) both name of the array and address of the first element
(b) one character
(c) the address of the first element
(d) name of array
20. The function sqrt() is part of header file.
(a) conio.h
(b) math.h
(c) iostream.h
(d) stdio.h

A A A D C C C B C D D A D D B A D D A B
1. What symbol is used to represent the connector
(a) parellogram
(b) rectangle
(c) rectangle with rounded end
(d) circle
2. Which of the following operators is not used in c
(a) >>
(b) >
(c) X
(d) &
3. How many keywords are there in C
(a) 31
(b) 34
(c) 30
(d) 32
4. Size of (double) returns———
(a) 2
(b) 10
(c) 8
(d) 4
5. Which of the following would you use to declare a character array called str large enough to fit the word HELLO
(a) char str[3]
(b) string str;
(c) char str[6]
(d) char str[5]
6. The operator % yields
(a) quotient value
(b) remainder after integer division
(c) Percentage value
(d) Fractional part
7. What is output of following Program?
main( )
{int x=10,y=5,p,q ;
p= x> 9 ;
q= x > 3 && y != 3 ;
printf( “p=%d q=%d ” ,p,q) ;
}
(a) p = 1 q = 1
(b) p =0 q = 0
(c) p = 1 q= 0
(d) p = 0 q = 1
8. M = 5, Y = M++, After executing these statements the value of M and Y are
(a) M=6, Y=5
(b) M=6, y = 7
(c) M=6, Y=6
(d) M=5, Y=6
9. If y is of integer type variable then the two expressions.
3*(y-8)/9 and (y-8)/9*3 yield the same value if
(a) y is an even number
(b) y is an odd number
(c) y-8 is an integer multiple of 3
(d) y-8 is an integer multiple of 9
10. The values of a,b and c in the statement scanf(“%d%f%c”,&a,&b,&c); if the input stream is 15.75 23 x is
(a) 15 23.00 x
(b) 15 0.75 2
(c) 15 23 x
(d) 15 0.75 x
11. switch(ch)
{case ‘a’: printf(“a”);
case ‘b’: printf(“b”);
default: printf(“error”);
} if ch is assigned to the character ‘a’ then the output will be
(a) a
(b) a b
(c) error
(d) a b error
12. The minimum number of times the for loop is executed is
(a) 2
(b) cannot be predicted
(c) 0
(d) 1
13. What will happen if you put too few elements in an array when you initialize it.
(a) Error at run-time
(b) Error message from the compiler
(c) Possible system malfunction
(d) Unused elements will be filled with 0’s or garbage
14. If we don’t initialize a static array, what will be the elements set to:
(a) a floating point number
(b) 0
(c) an undetermined value
(d) character constant
15. Strings always ends with
(a) null character (‘\00)
(b) semicolon ( ; )
(c) colon ( : )
(d) question mark ( ? )
16. A function can return only value
(a) zero
(b) one
(c) two
(d) three
17. Recursive functions are executed in
(a) last in first out order
(b) distributed fashion
(c) parallel fashion
(d) first in first out order
18. What is the use of strcpy( ) function
(a) finds the length of the string
(b) copies one string into another
(c) string concatenation
(d) string comparison
19. The global variable can be declared
(a) after main
(b) after block
(c) before main
(d) within block
20. #define PI 3.14 is a kind of .
(a) Pre compiler directive
(b) Preprocessor directive
(c) Processor directive
(d) Compiler directive
D C D C C B A A D B D C D B A B A B C B

1. C language has been developed by
(a) Ken Thompson
(b) Martin Richards
(c) Dennis Ritchie
(d) Peter Norton
2. A block is enclosed with pair of
(a) { }
(b) <>
(c) [ ]
(d) ( )
3. Predefined identifiers are called
(a) functions
(b) variables
(c) reserved words
(d) constants
4. What is size of double variable?
(a) 1 byte
(b) 10 Bytes
(c) 4 Bytes
(d) 8 Bytes
5. The declaration of a variable should be done
(a) after using it
(b) only in the calling program
(c) before using it
(d) at the time of using
6. What is the remainder of 8%10?
(a) 8
(b) 2
(c) 0
(d) 1
7. How many logical operators C provides?
(a) 3
(b) 4
(c) 1
(d) 2
8. main( )
{ int a=0; if(a) printf(“%d”,++a); else printf(“%d”, a+=2) ; } the output is
(a) 2
(b) 1
(c) 3
(d) 0
9. What value would be stored in an integer variable “i” as a result of the following calculation:
int i,j; j=3; i=4+2 * j/(j-1);
(a) 7
(b) 6
(c) 1
(d) 8
10. The function putchar( ) uses
(a) one argument
(b) no argument
(c) two argument
(d) any number of arguments
11. Output of the following programs is
main()
{int a,b,c;
scanf( %d %d ”, &a,&b);
if(a>b)
printf(“%d”,a);
else
printf(“%d”,b);
}if input is 10 5
(a) 20
(b) 105
(c) 10
(d) 5
12. Give the output of the following program:
#include < stdio.h >
main()
{int I=1;
while (I < 5)
{printf(“%d”, I);
}}
/* End of Main */
(a) Print the value of I as 1
(b) Warning for no return type for main ( )
(c) Infinite loop
(d) Prints the value of I as11111
13. Output of the below program
#include
main()
{int a,b=0;
int c[10]={1,2,3,4,5,6,7,8,9,0 };
for(a=0;a<10;++a)
b+=c[a];
printf(“%d”,b);
}
(a) 1 3 6 10 15 21 28 32 45 45
(b) 55
(c) 45
(d) 0
14. consider the array definition
int num [10] = { 3 ,3 ,3 };
pick the correct answers
(a) This is syntactically wrong
(b) the value of num[8] is 3
(c) this is invalid if it comes within a function
(d) the value of num[2] is 3
15. Which of the follwing is a string
(a) ‘abcd’
(b) “abcd”
(c) abcd
(d) ‘abcd”
16. Actual and formal parameters must agree in
(a) data types
(b) number of argument and datatypes
(c) names and data type
(d) names and number of arguments
17. output of the following program is
#include< stdio.h>
main()
{int a,count;
int funct( int count);
for( count=1;count<=5;++count)
{a=funct1(count);
printf(“%d”,a);
}}
int funct1(int x)
{int y;
y= x*x;
return(y);
}
(a) 1 4 9 16 25
(b) 25
(c) 36
(d) 25 9 16
18. In the following C-statement, what is the datatype of d and st respectively.
Printf {“\t%.s\n”, d, st);
(a) character, string
(b) digit, string
(c) digit, character
(d) string, string
19. Consider the following program
main()
{int a= 2;
printf(“%d”,a);
modify(a);
printf(“%d”,a);
}void modify(int a)
{a=a*3;
printf(“%d”,a);
return;
}The output of the above program is
(a) 2 6 6
(b) 6 2 6
(c) 6 6 2
(d) 2 6 2
20. #define PI 3.14 is a kind of .
(a) Compiler directive
(b) Preprocessor directive
(c) Processor directive
(d) Pre compiler directive
C A C D C A A A A A C C C D B B A B D B

cds online bits

1. Representing various steps in a flow diagram is called as
(a) diagram
(b) flow chart
(c) program
(d) paint
2. A block is enclosed with pair of
(a) ( )
(b) [ ]
(c) <>
(d) { }
3. Which of the following is an incorrect variable name.
(a) age
(b) string
(c) else
(d) name
4. Which of the following is a primary data type?
(a) array
(b) int
(c) enum
(d) typedef
5. In the following, which is not valid character constant ?
(a) ‘2’
(b) “#”
(c) ‘#’
(d) ‘B’
6. Which of the following operators takes only integer operands?
(a) *
(b) %
(c) /
(d) +
7. The equality relational operator is represent by
(a) =
(b) ==
(c) .EQ.
(d) :=
8. What is the value of !0?
(a) -1
(b) 1
(c) 0
(d) 00
9. The operation between integer and float always yield result in
(a) character
(b) float
(c) constant
(d) Integer
10. The output of the following program is
main( )
{int i=2;
printf(“%d %d %d”,i++,i,++i);
}
(a) 3 3 3
(b) 2 2 4
(c) 2 3 4
(d) 2 3 3
11. Which is syntactically correct:
(a) if (a.eq. 10) {; } else if (a<10) {; }
(b) if (a:=10) {; } else if (a<10) {; }
(c) if (a eq 10) {; } else if (a<10) {; }
(d) if (a==10) {; } else if (a<10) {; }
12. Which command is used to skip the rest of a loop and carry on from the top of the loop again?
(a) continue;
(b) break;
(c) resume;
(d) switch;
13. What will happen if you try to put so many values into an array during the initalization such that its size is
exceeded.
(a) Error message from the compiler
(b) Possible system malfunction
(c) Nothing
(d) Last element data may be overwritten
14. The total number of elements in array a[n][m]
(a) (n-1)*(m-1)
(b) n*m
(c) n+m
(d) (n+1) * (m+1)
15. What is the output of the following program?
void main()
{char name[4] =
{‘R’, ‘
A’, ‘
V’ ‘
I’ };
printf (“%s”, name);
}
(a) RAVI followed by a garbage value
(b) RAV
(c) only garbage value
(d) RAVI
16. If the number of actual arguments are not matching with formal arguments then
(a) no error
(b) compiler error
(c) logical error
(d) syntax error
17. output of the following program is
#include< stdio.h>
main()
{int a,count;
int funct( int count);
for( count=1;count<=5;++count)
{a=funct1(count);
printf(“%d”,a);
}}
int funct1(int x)
{int y;
y= x*x;
return(y);
}
(a) 36
(b) 25
(c) 25 9 16
(d) 1 4 9 16 25
18. What will be the output of the following program?
void main()
{char txt[ ]
=

ABC\0DEF”;
printf(“%s %d”, txt, sizeof (txt));
}
(a) ABC 8
(b) ABC\0DEF 7
(c) ABCDEF 8
(d) ABC 4
19. Consider the following program
main()
{int a= 2;
printf(“%d”,a);
modify(a);
printf(“%d”,a);
}void modify(int a)
{a=a*3;
printf(“%d”,a);
return;
}The output of the above program is
(a) 2 6 2
(b) 6 2 6
(c) 6 6 2
(d) 2 6 6
20. How would you declare a constant of 5 called “MYCONST”?
(a) var int MYCONST=5
(b) int myconst = 5;
(c) constant MYCONST = 5;
(d) #define MYCONST 5
B D C B B B B B B A D A A B A B D A A D
1. The symbol with rounded ends is used to represent
(a) equation processing
(b) start/ stop
(c) decision making
(d) input/output
2. The constant ‘\00 is called as
(a) nill
(b) full
(c) zero
(d) null
3. In the following which one is not a C keyword?
(a) for
(b) case
(c) choice
(d) volatile
4. Identify the wrong datatype declaration
(a) long double ld;
(b) unsigned long int a,b;
(c) long float f1;
(d) signed a;
5. Which of the following would you use to declare a character array called str large enough to fit the word HELLO
(a) char str[5]
(b) char str[3]
(c) string str;
(d) char str[6]
6. Associativity of arithmetic operators is from
(a) right to left
(b) left to right
(c) middle to right
(d) middle to left
7. What is the result of 5 &&2 ?
(a) 0
(b) 5
(c) 1
(d) 2
8. What is the value of !0?
(a) 00
(b) 1
(c) -1
(d) 0
9. x = 9 - ((12 / 3 ) + 3 * 2 ) - 1 what is the value of x.
(a) -2
(b) 2
(c) 8
(d) 10
10. How would you copy the name “Hello” to a character array (i.e. string) declared as char str[10];
(a) printf( str, “Hello” );
(b) strcat(str,“Hello”);
(c) strcpy( str, “Hello” );
(d) str = “Hello”;
11. The case statement in switch ( ) is separated by
(a) goto
(b) break
(c) exit
(d) continue
12. What would be the final value of x after execution of the following program?
# include (stdio.h)
void main()
{int x = 1;
do while (x<=10)
{x++;
} while (x< = 5);
printf (“\n x = %d”, x);
}
(a) x = 2
(b) 10
(c) x = 11
(d) x = 6
13. What will happen if you try to put so many values into an array during the initalization such that its size is
exceeded.
(a) Nothing
(b) Last element data may be overwritten
(c) Possible system malfunction
(d) Error message from the compiler
14. Consider the statement
int val[2][4]={1,2,3,4,5,6,7,8 }; 4 will be the value of
(a) val[1][1]
(b) val [0] [3]
(c) val[1][4]
(d) val[0][4]
15. Which function is used to convert a string of digits into their integer values
(a) btoi
(b) itoa
(c) atoi
(d) asctoint
16. The parameters of the called function are called
(a) casual parameters
(b) formal parameters
(c) usual parameters
(d) actual parameters
17. Recursion means
(a) Function calling a same function
(b) Function without a return value
(c) Function calling a function
(d) Passing a function to a function
18. The strcat( ) function is used for
(a) Multiplication
(b) Addition
(c) Concatenation
(d) Joining
19. The lifetime of external variables is
(a) only in main function
(b) only within the function where it is declared
(c) only in some specified functions
(d) throughout the program
20. #define PI 3.14 is a kind of .
(a) Processor directive
(b) Pre compiler directive
(c) Preprocessor directive
(d) Compiler directive
B D C D D B C B A C B C D B C B A C D C
1. What symbol is used to represent input/output operations in a flow chart.
(a) Parellograms
(b) circles
(c) Rectangles
(d) Rectangle with rounded end
2. The ANSI C standard recognizes maximum length of a variable up to
(a) 31 characters
(b) unlimited characters
(c) 15 characters
(d) 8 characters
3. Which of the following is an incorrect variable name.
(a) string
(b) name
(c) else
(d) age
4. Identify the wrong datatype declaration
(a) unsigned long int a,b;
(b) signed a;
(c) long float f1;
(d) long double ld;
5. C variable cannot start with
(a) an upper case letter
(b) a number
(c) a lower case
(d) an underscore
6. The operator ++ is called as operator
(a) special increment
(b) decrement
(c) double addition
(d) increment
7. How many logical operators C provides?
(a) 3
(b) 2
(c) 4
(d) 1
8. The symbol for right shift operator is
(a) <=
(b) − >
(c) >>
(d) >
9. The expression M = 4+2% - 8 evaluates to
(a) 12
(b) 6
(c) 4
(d) -6
10. Which of the following statements would read a single character from the keyboard and place the result in a character
variable ‘ch’ defined as: char ch;
(a) while(!kbhit)
(b) printf( “%c”, ch );
(c) ch = getch( );
(d) getkeyb ( ch );
11. The default statement is executed when
(a) all the case statements are false.
(b) one of the cases is false
(c) one of the cases is true
(d) the condition is not properly defined
12. consider the following program fragment .
char c = ‘a’;
while (c++ ¡= ‘z’)
putchar(xxx);
If the required output is a sequence of alphabets a to z written in a row then the value of the varriable xxx should be
(a) c
(b) b
(c) -c
(d) c-1
13. The value within the [] brackets in an array declaration specifies
(a) address value
(b) value of the array element
(c) size of an array
(d) subscript value
14. Dynamic memory allocation in array results in
(a) allocation of memory at debugging time
(b) allocation of memory at compile time
(c) allocation of memory at file saving time
(d) allocation of memory at runtime
15. Which function is used to convert a string of digits into their integer values
(a) itoa
(b) atoi
(c) asctoint
(d) btoi
16. The names of actual parameters and formal parameters
(a) almost same
(b) should be same
(c) always same
(d) need not be same
17. What is the output of the following program?
main()
{int x , y;
x = 10; y = 100;
change (x,y)
printf (“%d, %d”, x,y);
}change (
int x, int y);
{int k;
k = a; a = b; b = k;
}
(a) 100, 100
(b) 10, 10
(c) 10, 100
(d) 100, 10
18. What is the output of the following program
void main()
{char nm[ ]
=
{‘H’, ‘
E’, ‘\0’};
int x=0 ;
while (nm[x]! = \0)
printf (“%c”, nm [x++]);
}
(a) \0
(b) H
(c) HE\0
(d) HE
19. In case both external and autovariables are declared with the same name in a program, the priority is given to
which of the variables
(a) depends on logic
(b) complier dependent
(c) external variable
(d) auto variable
20. Which of the following is a correct way of defining a symbolic constant pie in C
(a) # define pie = 22/7
(b) # Define pie 22/7
(c) #define pie= 3.142
(d) #define pie 22/7
A A C B B D A C B C A D C D B D C D D D
1. Pick up the wrong sequence
(a) Data analysis, Development of algorithm, Program coding
(b) Program coding, Debugging, Data analysis
(c) Problem identification, Task analysis, Data analysis
(d) Problem coding, Testing, Debugging
2. A machine language program consists of instructions written in
(a) english like words
(b) keywords
(c) mnemonics
(d) 0’s and 1’s
3. Which of the following is not a keyword
(a) constant
(b) signed
(c) typedef
(d) register
4. What is the size of long double variable
(a) 8 bytes
(b) 16 bytes
(c) 10 bytes
(d) 4 bytes
5. Variables are initialized in C, using
(a) = =
(b) >
(c) : =
(d) =
6. The operator % yields
(a) remainder after integer division
(b) Percentage value
(c) Fractional part
(d) quotient value
7. The equality relational operator is represent by
(a) .EQ.
(b) :=
(c) =
(d) ==
8. The symbol for one’s complement operator is:
(a) ^
(b) _
(c) |
(d) &
9. Which of the following arithmetic expression is invalid
(a) 7.5 % 3
(b) 9% -3
(c) -9%3
(d) 2 + 3/5
10. Consider scanf(“%2d”, &n); and the input data is 3142 then what value is assigned to n
(a) 42
(b) 31.42
(c) 31
(d) error
11. Switch case construct is an alternative for
(a) Do-while loop
(b) For loop
(c) If-else construct
(d) While loop
12. For (I=0; I<=10, I++) this loop will execute times
(a) 9
(b) 10
(c) 12
(d) 11
13. The total memory required for an array
(a) sizeof (datatype) * 2
(b) size of (array) * datatype
(c) size of (datatype) * size of used array elements
(d) sizeof (datatype) * sizeof array
14. Dynamic memory allocation in array results in
(a) allocation of memory at debugging time
(b) allocation of memory at file saving time
(c) allocation of memory at compile time
(d) allocation of memory at runtime
15. The following program fragment
int m,n,b; char wer[80]; m=n=b=8;
sprintf(wer,“%d%d%d”,m,n,b);
puts(wer);
(a) prints the string 888
(b) prints the null string
(c) prints the string 8 8 8
(d) prints 888 888 888
16. The parameters of the calling function are called
(a) formal parameters
(b) usual parameters
(c) casual parameters
(d) actual parameters
17. When you pass an array as an argument to a function, what actually gets passed
(a) Address of the array
(b) Number of elements of the array
(c) Address of the last element of the array
(d) Values of the elements of the array
18. What will be the output of the following program?
void main()
{char txt[ ]
=

ABC\0DEF”;
printf(“%s %d”, txt, sizeof (txt));
}
(a) ABCDEF 8
(b) ABC\0DEF 7
(c) ABC 8
(d) ABC 4
19. The following program
main()
{inc(); inc(); inc();
}inc()
{static int x;
pritnf(“%d”, ++x);
}
(a) Prints 0 1 2
(b) Prints three consecutive unpredictable numbers
(c) Prints 1 1 1
(d) Prints 1 2 3
20. Which of the following is a correct way of defining a symbolic constant pie in C
(a) # define pie = 22/7
(b) # Define pie 22/7
(c) #define pie 22/7
(d) #define pie= 3.142
B D A C D A D B A C C D D D A D A C D C
1. C language has been developed by
(a) Dennis Ritchie
(b) Peter Norton
(c) Martin Richards
(d) Ken Thompson
2. The function getchar( ) is used to read
(a) a boolean value
(b) a word
(c) a string
(d) a character
3. What are the smallest individual units in a program
(a) record
(b) Functions
(c) Structures
(d) Tokens
4. If the signed integer needs two bytes of storage then maximum value of signed integer is
(a) 215-1
(b) 216
(c) 215
(d) 216-1
5. The value of an automatic variable that is declared but not initialized will be
(a) -1
(b) 0
(c) 1
(d) unpredictable
6. Which of the following statements will subtract a value of 2 from the variable ‘i’?
(a) i–;
(b) i+=-2;
(c) i- = 2;
(d) i= -2;
7. What is output of following Program?
main( )
{int x=10,y=5,p,q ;
p= x> 9 ;
q= x > 3 && y != 3 ;
printf( “p=%d q=%d ” ,p,q) ;
}
(a) p = 1 q= 0
(b) p =0 q = 0
(c) p = 1 q = 1
(d) p = 0 q = 1
8. main( )
{ int a=0; if(a) printf(“%d”,++a); else printf(“%d”, a+=2) ; } the output is
(a) 0
(b) 2
(c) 3
(d) 1
9. If y is of integer type variable then the two expressions.
3*(y-8)/9 and (y-8)/9*3 yield the same value if
(a) y-8 is an integer multiple of 9
(b) y-8 is an integer multiple of 3
(c) y is an odd number
(d) y is an even number
10. The values of a,b and c in the statement scanf(“%d%f%c”,&a,&b,&c); if the input stream is 15.75 23 x is
(a) 15 0.75 x
(b) 15 23.00 x
(c) 15 0.75 2
(d) 15 23 x
11. Which of the following statement is not true about the switch statement
(a) In switch() case statement nested if can be used
(b) No two case statements have identical constants in the same switch
(c) The switch() can evaluate relational or logical expressions
(d) Character constants are automatically converted into integer
12. How many while statements are possible in do.... While loop?
(a) 2
(b) any number
(c) 1
(d) 3
13. The number of elements in array declaration
(a) requires to be specified
(b) assume default size as ‘0’
(c) dynamically identifies based on largest index used in program
(d) does not require to be specified
14. An array which contains two subscripts, to represent each element is called as
(a) three dimensional
(b) two dimensional
(c) one dimensional
(d) multidimensional
15. putchar() and getchar() are both
(a) type declaration statements
(b) assignment statements
(c) input and output statements
(d) control statement
16. C facilities
(a) both top-down and bottom-up programming
(b) no modular programming
(c) bottom-up modular programming
(d) top-down modular programming
17. What is the output of
main()
{int x, change (int);
x = 20;
change (x);
printf (“%d”, x);
return 0;
}change (
int x);
{x = 10;
printf (“%d”. x);
}
(a) 10 30
(b) 10 20
(c) 10 10
(d) 20 20
18. String handling functions are kept in
(a) string.h
(b) conio.h
(c) stdlib.h
(d) stdio.h
19. The lifetime of automatic variables is
(a) limited to some functions
(b) until the end of the function
(c) throughout the program
(d) limited to main function
20. #include is a directive
(a) processor
(b) pre-processor
(c) complier
(d) pre-compiler
A D D A D C C B A C B B A B C D B A B B
1. What is the appropriate order of refinement in a problem solving.
(a) pseudo code, flowchart, program
(b) program, flow chart, pseudo code
(c) flow chart, program, pseudo code
(d) flow chart, pseudo code program
2. The purpose of main function is
(a) to stop algorithm
(b) to stop program execution
(c) to start algorithm
(d) to start program execution
3. Which of the following is an incorrect variable name.
(a) name
(b) else
(c) age
(d) string
4. What is range of char data value?
(a) 0 to 255
(b) -64 to 64
(c) -127 to 128
(d) -128 to 127
5. Which of the following statements is wrong
(a) mes = 123.56
(b) 3+a=b;
(c) This = ‘T’ * 20 ;
(d) con = ‘T’ * ‘A’ ;
6. The operator ++ is called as operator
(a) special increment
(b) decrement
(c) double addition
(d) increment
7. How many logical operators C provides?
(a) 2
(b) 4
(c) 3
(d) 1
8. The symbol for one’s complement operator is:
(a) ^
(b) _
(c) |
(d) &
9. The operation between integer and float always yield result in
(a) float
(b) Integer
(c) character
(d) constant
10. What is the output for the following program
main( )
{ int m=5,y;
y=++m;
printf(“%d,%d”m,y);
}
(a) 6,6
(b) 5,6
(c) 7,5
(d) 5,5
11. Output of the following programs is
main()
{int a,b,c;
scanf( %d %d ”, &a,&b);
if(a>b)
printf(“%d”,a);
else
printf(“%d”,b);
}if input is 10 5
(a) 5
(b) 20
(c) 10
(d) 105
12. What is the output of the following program
main()
{ int a=123;
int r, rev=1;
while (a > 0)
{a=a%10;
rev=rev*10+a;
a=a/10;
}printf(“%d”,rev);
}
(a) 321
(b) 3 0 2 0 1
(c) 123
(d) 3
13. What will happen if you put too few elements in an array when you initialize it.
(a) Error message from the compiler
(b) Error at run-time
(c) Unused elements will be filled with 0’s or garbage
(d) Possible system malfunction
14. # define six 2*3 main() { int x=12/six; print (“%d”,x); }
(a) 2
(b) 12
(c) 8
(d) 18
15. char city [9] = “NEW YORK”; printf(“%c”, city[4]);
what is the output?
(a) N
(b) Y
(c) ‘K’
(d) a blank character
16. Actual and formal parameters must agree in
(a) data types
(b) names and number of arguments
(c) names and data type
(d) number of argument and datatypes
17. Find the output of the following program.
void main()
{int x, f, fact(int);
x = 5;
f = fact (x);
printf (“%d”, f);
}fact (int m)
{int f =1;
if (m = = 1) return (1);
else
f = m * fact (m - 1);
return (f);
}
(a) 120
(b) 24
(c) 0
(d) 5
18. In the following C-statement, what is the datatype of d and st respectively.
Printf {“\t%.s\n”, d, st);
(a) digit, character
(b) digit, string
(c) character, string
(d) string, string
19. What happens when the declared register variables count exceeds the available number of processor registers.
(a) system hangs
(b) are treated as non register variables
(c) program halts
(d) it results register page faults
20. Which of the following is a correct way of defining a symbolic constant pie in C
(a) # Define pie 22/7
(b) #define pie 22/7
(c) # define pie = 22/7
(d) #define pie= 3.142
D D B D B D C B A A C A C D B D A B B B
1. The characters that are not displayed in the screen are referred as
(a) escape sequences
(b) control characters
(c) numeric characters
(d) Special characters
2. A machine language program consists of instructions written in
(a) 0’s and 1’s
(b) english like words
(c) keywords
(d) mnemonics
3. Which of the following is not a keyword
(a) constant
(b) signed
(c) typedef
(d) register
4. The keyword is used to define a new data type.
(a) array
(b) Structure
(c) union
(d) typedef
5. Which of the following statement is syntactically wrong
(a) int m;count;
(b) double p,x;
(c) double p=3.142,x;
(d) int x;
6. Addition of two numbers is performed using
(a) relational operators
(b) arithmetic operators
(c) logical operators
(d) conditional operators
7. Among the following operators, whose associatively is right to left
(a) logical operators
(b) bitwise operators
(c) conditional expression
(d) arithmetic operators
8. The symbol for right shift operator is
(a) <=
(b) − >
(c) >>
(d) >
9. What value would be stored in an integer variable “i” as a result of the following calculation:
int i,j; j=3; i=4+2 * j/(j-1);
(a) 6
(b) 7
(c) 1
(d) 8
10. Consider scanf(“%2d”, &n); and the input data is 3142 then what value is assigned to n
(a) 31.42
(b) 31
(c) 42
(d) error
11. The conditional operators “ ? :” is similar to
(a) nested if
(b) if-then-else
(c) while
(d) do-while
12. Which of the following statement causes an immediate exit from the inner most loop structure.
(a) kill
(b) stop
(c) break
(d) exit
13. The amount of storage required for holding elements of the array depends on
(a) run-time requirement
(b) data type
(c) datatype and size
(d) size
14. int table [2][3] ={{0}, {0}} in this statement
(a) none of the element are initialized to zero
(b) only first row elements are initialized to zero
(c) only last row elements are initialized to zero
(d) all the array elements are initialized to zero
15. Literal means
(a) A character
(b) A string
(c) A string constant
(d) An alphabet
16. The parameters in a function definition are
(a) actual parameters
(b) dummy parameters
(c) real parameters
(d) formal parameters
17. If the value of the formal argument is changed in the called function; the corresponding change in the calling
function, if it is call by value
(a) reflects
(b) does not reflects
(c) unpredictable
(d) machine dependent
18. In the following C-statement, what is the datatype of d and st respectively.
Printf {“\t%.s\n”, d, st);
(a) string, string
(b) character, string
(c) digit, string
(d) digit, character
19. If storage class is missing in the array definition , by default it will take to be
(a) automatic
(b) either automatic or external depending on the place of occurrence
(c) external
(d) static
20. Which of the following is a correct way of defining a symbolic constant pie in C
(a) # Define pie 22/7
(b) # define pie = 22/7
(c) #define pie 22/7
(d) #define pie= 3.142
A A A D A B C C B B B C C D C D B C B C

Copyright © 2008 - JNTU Online Bits - is proudly powered by Blogger
JNTU