Fundamentals of



Download 9.46 Mb.
Page36/57
Date09.01.2017
Size9.46 Mb.
#8172
1   ...   32   33   34   35   36   37   38   39   ...   57

30. C allows arrays of greater than two dimensions, who will determined this


(A) Parameter (B) Compiler (C) Programmer

31. A pointer to a pointer in a form of

(D) None of these


(A) Multiple indirection

(C) Both A & B

32. Pointers are of

(A) Integer data type

(C) Character data type

(B) A chain of pointers



(D) None of these
(B) Unsigned integer data type

(D) None of these




33. Maximum number of elements in the array declaration int a[5] [8] is

(A) 28 (B) 32 (C) 35 (D) 40

34. If the size of the array is less than the number of initialises then,


(A) Extra values are being ignored

(C) Size of array is increased



35. Array subscripts in C always start at

(B) Generates an error message

(D) Size is neglected when values are given


(A) -1

36. A Structure

(B) 0 (C) 1 (D) Value provided by the user


(A) Cannot be read as a single entity (B) Can be read as a single entity

(C) Can be displayed as a single entity

(D) has member variables that cannot be read individually



37. Identify the invalid pointer arithmetic

(A) Addition of float value to a pointer



(B) Comparison of pointers that do not point to the element of the same array

(C) Subtracting an integer from a pointer

(D) Assigning the value 0 to a pointer variable

38. An identifier cannot start with

(A) # (B)_ (C) Uppercase alphabet (D) Lowercase alphabet





39.

Symbolic constants are defined as -





40.

(A) # define sl s2 (B) #define sl s2;

An escape sequence commences with -

(C) #define sl = s2

(D) #define sl = s2;


41.

(A) \ (B) / (C) # (D)?

Identify the wrong declaration







(A) int n = (7); (B) char c2 = 'A' + 25, c1 = 'z'; (C) int a =10,b = 20,c; (D) int x = 10, y = x*20,

year;

(e) None of above

42. Where does execution of every C program starts?

(A) main () (B) begin () (C) start () (D) init ()

43. Which operator is not used in C.


(A) ** (B) ~ (C) %

44. The operator % can be applied only to

(D) 1\


(A) Integral values (B) Float and double value (C) Char value (D) All of these

45. Identify the relational operator

(A) ! (B) > (C) " (D)&&

46. Which operator has highest priority?


(A) ++ (B) + (C) %

47. In C how is logical AND represents?

(D)/


(A) II (B) AND (C) && (D)@@

48. lf the value of a = 10 and b = -1, the value of x after executing the following expression is

x = (a != 10) && (b=1)

(A) 0 (B) 1 (C) -1 (D) 10



49. How many main o function can be define in a C program?

(A) 1 (B) 2 (C) 3 (D) Any number of times

50. int z, x=5, y=10,a=4, b=2;

z = x++ - --y*b/a;

What will be value of z in above sample code?




(A) 5 (B) 10

(C) 11 (D) 1



ANSWERS

1. A 2. D 3. D 4. B 5. A 6.A 7. C 8. A 9. D 10. B 11. A 12. A 13. A

14. B 15. B 16. A 17. C 18. B 19. B 20. B 21. A 22. D 23. D 24. D 25. B

26.A

27. B

28. A

29. A

30. B

31. C

32. D

33. D

34. B 35. B

36.A

37. A

38. A

50. D

39. A

40. A

41. E

42. A

43. A

44. A

45. B

46.A 47. C

48. A

49. A



4. The tab is represented by which escape sequence?

(A) \t (C) \n (B) %d (D) None above




5. Which of the variables can have many declarations but only one definition?

(A) Local variable (B) Global variable (C) Static variable

6. Which function gets execute as we execute a 'C' program?

(A) Printf () (B) Main () (C) MAIN () (D) main ()



7. The variables can be initialized by

(A) Decrement operator( --) (B) Both A & C

(C) Equal to(=) (D) Less than equal to«=)

8. An------ integer variable values greater than or equal to zero
(D) All the above





(A) Unsigned (B) Long (C) Signed

(D) All the above

9.

............... are said to be user defined names.

(A) Constants (B) Identifiers (C) Keywords


(D) Header files




10. In C every------- has a type, a name, & a value

(A) Keywords (B) Function (C) Header files (D) Variable

11. Which of the data type has the range -128 to 127?


(A) Integer (B) Double (C) Character

12. The C program cannot start with a.................... .

(D) Float


(A) Number (B) Hyphen( -) (C) Spaces (D) All the Above

13. In one statement of C how many variables can be declared?


(A) Any no. of variables

(C) Ten variables

(B) One variable



(D) Two variables



Download 9.46 Mb.

Share with your friends:
1   ...   32   33   34   35   36   37   38   39   ...   57




The database is protected by copyright ©ininet.org 2024
send message

    Main page