Fundamentals of



Download 9.46 Mb.
Page34/57
Date09.01.2017
Size9.46 Mb.
#8172
1   ...   30   31   32   33   34   35   36   37   ...   57

constant is 32767


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

14. Integer Constant in C must have


(A) At least one digit

(C) At least one decimal point

(B) Digits separated by comma



(D) A comma along with digits


15. Which of the following is not a character constant?


(A) 'thank you' (C) '23.56E-03'

(B) 'enter values of P,N ,R'



(D) All the Above


16. If a is an integer variable, a=5/2 will return a value

(A) 2.5 (B) 0 (C) 3 (D) 2

17. If z is a float variable, z=4/2 will return a value

(A) 1.5 (B) 2.0 (C) 0 (D) None of the above

18. What is the value of !0?

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

19. Address of the variable can be displayed by operator.

(A) # (B) * (C) & (D)@

20. What would be the remainder of 8%10?

(A) 8 (B) 0 (C) 10 (D) None above

21. Addition of two numbers can be performed using .


(A) Binary Operator

(C) Unary Operator

(B) Arithmetic Operator



(D) Relational Operator


22. What is the result of 16>>2?

(A) 16 (B) 2 (C) 4

23. What is the result of 5 &&2?
(D) 8


(A) 1

(B) 0 (C) 2 (D) 5




24.

48 to 57 is said to be the ascii range for

.

(A) a to z (B) A to Z (C) 65 to 70 (D) 0 to 9

25. What is the ascii range for a to z letters?

(A) 97 to 122 (B) Both A & C (C) 0 to 9 (D) 90 to 120

26. Which function is appropriate for accepting a string?


(A) gets () (B) puts() (C) getche()

27 array always ends with a null ( \ 0) character

(D) scanf ()


(A) Integer (B) String (C) Character (D) Float

28. Array elements are stored in


(A) Scattered memory location

(C) Distributed location



(B) Sequential memory location

(D) Both A & C


29 =f u declare an array without initializing the value to it then it will be set to

(A) A null value (B) Zero (C) Garbage value (D) All the Above

30. ............... are passed as arguments to a function by reference & value

(A) Array (B) Constants (C) Variables (D) Both A & C

31. What is the correct way to declare a pointer?


(A) int ptr* (B) *int ptr (C) int *ptr

32 n array is a collection of

(D) int_ptr z


(A) Same data type (B) Both A & C (C) Different data type (D) None of the above




33 ll the elements in the array must be

(A) Initialized (B) of same type (C) Defined (D) Verified

34. A C variable cannot start with


(A) an alphabet (B) a number

(D) Both C and B

(C) a special symbol other than underscore




35. Which of these are reasons for using pointers?

(A) To manipulate parts of an array

(B) To refer to keyword such as 'for' and 'if'

(C) To return more than one value from a function

(D) To refer to particular programs more conveniently

36. Which of the following is a Scalar Data type

(A) Float (B) Union (C) Array

37. Which of the following are tokens in C?

(D) Pointer




(A) Keywords (B) Variables (C) Constants (D) All of the above

38. Which symbol is used as a statement terminator in C ?

(A) ! (B) # (C) - (D) ;

39. Which escape character can be used to begin a new line in C?

(A) \a (B) \ b (C) \m (D) \n

40. Which escape character can be used to beep from speaker in C?

(A)\a (B)\b (C)\m\ (D)\n

41. Character constants should be enclosed between _


(A) Single quotes (B) Double quotes (C) Both a and b

42. String constants should b encl between_

(D) None of these




(A) Single quotes (B) Double quotes (C) Both a and b (D) None of these
44. The maximum length of a variable in C is _ characters.

(A) 8 (B) 16 (C) 32 (D)64

45. What will be the maximum size float variable?


(A) 2 byte (B) 4 byte (C) 8 byte

46. What will be the maximum size double variable?

(D) 16 byte


(A) 2 byte (B)4 byte (C) 8 byte (D) 16 byte

47. A declaration float a,b; occupies of memory


(A) 1 byte (B) 4 byte (C) 8 byte

48. The size of a String variable is

(D) 16 byte


(A) 1 byte (B) 4 byte (C) 8 byte (D) None of these


Download 9.46 Mb.

Share with your friends:
1   ...   30   31   32   33   34   35   36   37   ...   57




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

    Main page