Q26. What is the use of \r in C?
A. used to insert a vertical tab
B. used to insert a tab
C. places cursor at the end of line
D. places cursor at the start of line
Ans. D
Q27. In C, compiler generally ignores the statement starting with
:
A. //
B. /
C. */
D. None of these
Ans. A
Q28. A type of pointer which has not been initialized :
A. dangling pointer
B. default pointer
C. wild pointer
D. None of these
Ans. C
Q29. The main purpose of ‘ ftell ‘ :
A. getting current file name
B. getting current file status
C. getting current file attributes
D. getting current file position
Ans. D
Q30. Where are the local variables are stored ?
A. Disk
B. Stack
C. Heap
D. OS
Ans. B
Q31. Which of the following is not present in string.h ?
A. strcpy()
B. strapp()
C. strlen()
D. strcat()
Ans. B
Q32. What is the best case and worst case of binary search ?
A. O(log n), O(n)
B. O(log n), O(log n)
C. O(1), O(1)
D. O(log n), O(1)
Ans. D
Q33. Using calloc() function, data members are initialized as :
A. garabage value
B. 0
C. 1
D. -1
Ans. B
Q34. How many kinds of classes are there in c++?
A. 1
B. 2
C. 3
D. 4
Ans. B
Q35. #include is called :
A. preprocessor directive
B. Inclusion directive
C. File Inclusion directive
D. None of these
Ans. A
Q36. If a function’s return type is not explicitly defined then
it’s default to
A. int
B. char
C. float
D. void
Ans. A
Q37. C Programming Language is often called as :
A. High Level Language
B. Middle Level Language
C. Low Level Language
D. None of these
Ans. B
Q38. Which of the following is true about C programming language
?
A. C is a structural lang.
B. C is a procedural lang.
C. C does not supports function within function
D. All of these
Ans. D
Q39. How many keywords are there in C Programming Language ?
A. 28
B. 32
C. 21
D. None of these
Ans. B
Q40. Which is not the extended keyword in C ?
A. _Imaginary
B. _Complex
C. inline
D. None of these
Ans. D
Q41. Process in which source code is combined with object code is
termed as :
A. Linker
B. Loading
C. Linking
D. None of these
Ans. C
Q42. An object of type ‘char’ is of :
A. 1 byte
B. 2 bytes
C. 4 bytes
D. 8 bytes
Ans. A
Q43. For 32 bits environment, size of ‘int’ data type is :
A. 2 bytes
B. 4 bytes
C. 8 bytes
D. None of these
Ans. B
Q44. In C, the names of variables, functions, labels, and various
other user-defined items are :
A. Keywords
B. Tokens
C. Identifiers
D. None of these
Ans. C
Q45. Which operator is used to return the length of the variables
in bytes ?
A. size()
B. length()
C. leng()
D. sizeof()
Ans. D
Q46. The format identifier ‘%i’ is also used for :
A. char
B. int
C. float
D. double
Ans. B
Q47. _________ is
used to break out of a program ?
A. break
B. continue
C. terminate
D. exit
Ans. D
Q48. Functions with same name and different parameters represents
:
A. function overloading
B. function overriding
C. recursion
D. None of the mentioned
Ans. A
Q49. Which precision specifier the number of significant digits ?
A. %g
B. %G
C. %f
D. Both a and b
Ans. D
Q50. In order to display address, we need :
A. %q
B. %a
C. %p
D. None of these

0 Comments