Q26. Which of the following does not initialize ptr to null (assume a = 0) ?
a) int *ptr = &a;
b) int *ptr = &a – &a;
c) int *ptr = a – a;
d) All of the mentioned
Q27. If :
char s[10],*p;
p = s;
C++
Copy
then, s[i] can be written as :
p = s;
C++
Copy
then, s[i] can be written as :
a) s – i
b) p + i
c) *(s + i)
d) *(p + i)
Q28. When a function is called by itself again and again, then it is :
a) call by value
b) call by reference
c) recursion
d) system function call
Q29. Which can never be called by value using call by value method ?
a) structure
b) union
c) array
d) all of these
Q30. What is the maximum number of arguments that can be passed in a single function ?
a) 341
b) 263
c) 253
d) 308
Q31. ______ is the collection of similar-type elements ?
b) Union
c) Array
d) String
Q32. Which is true about following statement in C :
void ( * abc( int, void ( *def) () ) ) ();
a) abc is a pointer variable to pointer-type function def.
b) Illegal statement
c) abc is a ptr to a function which takes 2 parameters.
d) None of the above
Q33. What can not be declared :
a) Array of integers
b) Array of pointers
c) Array of structures
d) None of the above
Q34. Which of the following is not a arithmetic operation :
a) n/=10
b) n*=10
c) n+=10
d) n!=10
Q35. Which datatype is not applicable for mod(%) operation ?
a) int
b) float
c) char
d) None of these
Q36. Functions with same name and different parameters represents :
a) function overloading
b) function overriding
c) recursion
d) None of the mentioned
Q37. getch() is present in this header file
a) stdio.h
b) conio.h
c) stdlib.h
d) None of the mentioned
Q38. This keyword is used for defining new data type names.
a) docstring
b) typedef
c) Both of them
d) None of them
Q39. Which precision specifier the number of significant digits ?
a) %g
b) %G
c) %f
d) Both a and b
Q40. In order to display address, we need :
a) %q
b) %a
c) %p
d) None of the mentioned
Q41. _______ is used to take user input in C.
b) printf()
c) scanf()
d) None of the above
Q42. ‘%[ ]’ is used for :
a) taking array as input
b) scans for set of characters
c) takes integer as input
d) None of the above
Q43. To avoid repetition of code and bulky programs, statements are isolated inside a _.
b) Modules
c) Header Files
d) None of the above
Q44. In C, order of passing arguments to a function is done :
a) left to right
b) right to left
c) Randomly
d) Manualy
Q45. pow() is present in which header file ?
a) maths.h
b) arithmetic.h
c) process.h
d) math.h
Q46. In pointers, meaning of ‘*’ is :
a) pointer variable
b) value at address
c) value of address
d) None of the mentioned
Q47. When double is converted to float then the value is ?
a) Truncated
b) Rounded
c) Depends upon compiler
d) None of the mentioned
Q48. Can we declare function inside structure of C ?
a) YES
b) NO
c) Both of them
d) None of them
Q49. Which of the following is an ternary operator in C?
a) &&
b) %%
c) !=
d) ?:
Q50. What is the use of ‘%%’ specifier ?
a) Finding remainder
b) Finding quotient
c) Printing % sign
d) None of the mentioned

0 Comments