C Language Questions For NET/SLET/GATE/JE/PSU/TA/JRF/PROGRAMMER Set-05


Q.1 C allows array of greater than two dimensions, who will determined this.
Ans.( A)programmer    (B)compiler    (C)parameter                  (D)None of these 

Q.2 Find the output of the following
        float a=5.5;
       Printf(“%d\n”,a);
Ans. (A)Runtime error  (B)5                (C)5.5                            (D)0


Q.3 Find the output of the following
             Int a =6;
            printf(“%f\n”,a);
 Ans. (A) Runtime error  (B)Runtime error  (C)syntax error  (D)logical error

Q.4 The declaration of clrscr() and getch() is given the in which header file.
Ans. (A)string.h            (B)stdlib.h              (C) conio.h         (D)stdio.h

Q.5 The primitives data types int, char, float and double are also known as scalar data types because they represents ……………….. at a time.
Ans. (A)Multiple        (B)Single                 (C)Double         (D)None of the Above

Q.6 Which is represented as a derived or structured data types.
Ans. (A)int                 (B)float                    (C)enum            (D)pointer

Q.7 What is header file in C.
Ans. (A) Built-in functions (B) Built-in data types  (C)constant value (D) All of these

Q.8 Which format specifier is used for print octal value.
Ans.(A)%f               (B)%h                         (C)%o             (D)%d

Q.9 What is the size of int or short data type.
Ans.(A)1 bytes       (B)2 bytes                  (C)4 bytes        (D)8 bytes

Q.10 Find the number of tokens
int a ,b, c;
Ans.(A)2               (B)5                             (C)7                 (D)9

Q.11 Find the number of tokens
f= ’A’+10/2-36;
Ans.(A)8             (B)10                            (C)11                (D)12

Q.12 Find the number of tokens
printf(“%d%d”,10,30);
Ans. (A) 3        (B) 4                              (C)9                  (D)10

Q.13 In C, \r is used for
Ans.(A)vertical tab  (B)back result      (C)form feed     (D) Carriage return

Q.14 Which is valid string constant in C?
Ans. (A)’hello”       (B) ”hello”            (C)”hello’          (D)’hello’

Q.15 Which is single character constant in C?
Ans.(A),A,              (B)”ABC”            (C) “A”              (D) ’A’

Q.16 Which is not valid identifier in C?
Ans.(A) abc+ 123   (B) order_no        (C) name            (D) _err                 

Answer Sheet:-Q.1(B) Q.2(D)  Q.3(A)  Q.4(C)  Q.5(B)  Q.6(D)  Q.7(A)  Q.8(C)  Q.9(B)  Q.10 (C) Q.11(B)  Q.12(C)  Q.13(D)  14(B) 15(A) 16(A)

                                                                 Page-04

No comments:

Post a Comment