C Language Questions

Q31. Which header file is used for dynamic memory allocation in C
(a) math.h
(b) stdio.h
(c) conio.h
(d) stdlib.h

Q32. A preprocessor directive is always preceded by a symbol
(a) *
(b) //
(c) #
(d) %

Q33. ______ return type cannot return any value to the caller
(a) int
(b) float
(c) void
(d) double

Q34. A pointer variable of type _______ cannot be dereferenced
(a) int*
(b) char*
(c) float*
(d) void*

Q35. Dynamic memory management functions are defined in ______ header file
(a) stdio.h
(b) stdlib.h
(c) conio.h
(d) stdallo.h

Q36. A class binds the ____ and its related _____ together
(a) data, function
(b) information, messages
(c) constants, variables
(d) class, objects

Q37. Break statement is most frequently used with in
(a) while
(b) it-else
(c) do-while
(d) switch-case

Q38. In C++ array subscript always starts with
(a) 0
(b) 1
(c) -1
(d) Any positive integer

Q39. In C++ << operator used for shifting bits can also be used for
(a) decrement
(b) increment
(c) addition
(d) displaying values

Q40. Which is the field width operator in C++
(a) endl
(b) set w
(c) new
(d) delete

Q41. C++ was developed by
(a) Ken Thompson
(b) Denis Richie
(c) Donald Knuth
(d) Bjarne Stroustrup

Q42. Which one is not a primary constant in C
(a) Integer
(b) Float
(c) Union
(d) Character

Q43. Which one is not a keyword in C
(a) auto
(b) stop
(c) break
(d) static

Q44. Which function receives value from the key board
(a) getf()
(b) printf()
(c) scanf()
(d) send()

Q45. If a C program contains only one function, it must be
(a) getch()
(b) main()
(c) exit()
(d) void()


1 2 3 4