Quiznetik

C Programming Basic | Set 1

1. Who is father of C Language?

Correct : B. dennis ritchie

2. C Language developed at _____?

Correct : A. at & t's bell laboratories of usa in 1972

3. For 16-bit compiler allowable range for integer constants is ______ ?

Correct : C. -32768 to 32767

4. C programs are converted into machine language with the help of

Correct : B. a compiler

5. A C variable cannot start with

Correct : D. both (b) and (c)

6. Which of the following is allowed in a C Arithmetic instruction

Correct : C. ()

7. Which of the following shows the correct hierarchy of arithmetic operations in C

Correct : D. * / + -

8. What is an array?

Correct : B. an array is a collection of variables that are of the same data type.

9. What is right way to Initialization array?

Correct : A. int num[6] = { 2, 4, 12, 5, 45, 5 } ;

10. An array elements are always stored in _________ memory locations.

Correct : A. sequential

11. What is the right way to access value of structure variable book{ price, page }?

Correct : A. printf("%d%d", book.price, book.page);

12. perror( ) function used to ?

Correct : B. prints the error message specified by the compiler

13. Bitwise operators can operate upon?

Correct : D. ints and chars

14. What is C Tokens?

Correct : D. a & b both

15. What is Keywords?

Correct : C. keywords have some predefine meanings and these meanings cannot be changed.

16. What is constant?

Correct : A. constants have fixed values that do not change during the execution of a program

17. Which is the right way to declare constant in C?

Correct : D. b & c both

18. Which operators are known as Ternary Operator?

Correct : B. ?, :

19. In switch statement, each case instance value must be _______?

Correct : A. constant

20. What is the work of break keyword?

Correct : C. exit from loop or switch statement

21. What is function?

Correct : D. all the above

22. Which one of the following sentences is true ?

Correct : B. the body of a do ... while loop is executed at least once.

23. A binary tree with 27 nodes has _______ null branches.

Correct : D. none of the above

24. Which one of the following is not a linear data structure?

Correct : B. binary tree

25. Recursive functions are executed in a?

Correct : D. last in first out order

26. Queue is a _____________ list.

Correct : D. fifo

27. The statement print f ("%d", 10 ? 0 ? 5 : 1 : 12); will print?

Correct : D. 1

28. To represent hierarchical relationship between elements, which data structure is suitable?

Correct : B. tree

29. Which of the following data structure is linear type?

Correct : D. all of the above

30. The statement printf("%c", 100); will print?

Correct : C. prints ascii equivalent of 100

31. The _______ memory allocation function modifies the previous allocated space.

Correct : D. realloc

32. Number of binary trees formed with 5 nodes are

Correct : D. 42

33. The "C" language is

Correct : A. context free language

34. The worst case time complexity of AVL tree is better in comparison to binary search tree for

Correct : D. search, insert and delete operations

35. In which tree, for every node the height of its left subtree and right subtree differ almost by one?

Correct : B. avl tree

36. C is ______ Language?

Correct : A. low level

37. The Default Parameter Passing Mechanism is called as

Correct : A. call by value

38. What is Dequeue?

Correct : B. elements can be added to or removed from either the front or rear

39. In which linked list last node address is null?

Correct : C. singly linked list

40. Which is the correct syntax to declare constant pointer?

Correct : D. a and c both

41. printf("%d%d", book.price, book.page);

Correct : A. b. printf("%d%d", price.book, page.book);

42. A. double and chars

Correct : D. ints and chars

43. A. The smallest individual units of c program

Correct : D. a & b both

44. B. Keywords have some unknown meanings and these meanings cannot be

Correct : C. hanged.

45. B. Constants have fixed values that change during the execution

Correct : A. of a program

46. A. int constant var =10;

Correct : D. b & c both

47. A. Constant

Correct : A. b.

48. A. Halt execution of program

Correct : C. exit from loop or switch statement