Type Here to Get Search Results !

C Programming MCQ with Answers [ SET - 1 ] | 100 Multiple Choice Questions in C Programming with Answers pdf Download

 

100 Multiple Choice Questions in C Programming with Answers pdf Download

1. The escape sequence '\r' means 

     new line
    form feed
    carriage return
ANSWER= (C) carriage return

 

2. Who is father of C Language?

     bjarne stroustrup
     dennis ritchie
    james a. gosling
ANSWER= (B) dennis ritchie

 

3. Which is the correct way to declare a pointer?

     int_ptr;
    int *ptr;
    *int ptr;
ANSWER= (B) int *ptr;

 

4. Write the output of the following program part: 

int q = 3959, d;

d=printf("%d", q);

printf("d=%d",d);

     d = 395 
    d=0
    d=3
ANSWER= (D) d=4

 

5. The program instructions and global and static variables are stored in a region known as a permanent storage area and the local variables are stored in another area are called ___

     Stack
     Linked list
    Array
ANSWER= (A) Stack

 

6. int i = -1; then memory location of i contains -

     FFFF
     8000H 
    -1
ANSWER= (A) FFFF

 

7. C is a which level language.?

    Low Level
    High Level
    Low + High
ANSWER= (B) High Level

 

8. The maximum negative value that a single integer variable can store is -

    -64536 
    -32768 
    -32767 
ANSWER= (B) -32768 

 

9. If one or more structure are other structures, then the structure is known as

    Nested structure
    Structured structure
    Invalid structure
ANSWER= (A) Nested structure

 

10. If a 11 and b = 3, what is the value of a%b? -

    -3,
    -2,


ANSWER= (D) 2

 

11. It is divided from a computing language named …… and from an earlier language ……

    B, BCLP
    B, PCPL
    B, BCPL
ANSWER= (C) B, BCPL

 

12. Which is the reserved word in C

    include,
     struct,
    null,
ANSWER= (B) struct,

 

13. C Language developed at _____?

    at & t\s bell laboratories of usa in 1972
    at & t\s bell laboratories of usa in 1970
     sun microsystems in 1973
ANSWER= (A) at & t\s bell laboratories of usa in 1972

 

14. Consider the variables char c = 'p'; int i = 6, f= 2;

The result of the expression c<(i+f) -



    false,
ANSWER= (A) 0

 

15. What is the work of break keyword?

     halt execution of program
     restart execution of program
    exit from loop or switch statement
ANSWER= (C) exit from loop or switch statement

 

16. char p = 67; printf("%c", p), then the output will be - 




ANSWER= (A) C

 

17.  Which one is a collection of one or more variables, possibly of different types, grouped together under a single name for convenient handling

     Pointer
    Matrix
    Array
ANSWER= (D) Structure

 

18.  #define max (a, b) a<b?a:b. 

int al = 8, a2 = 9; 

printf ("%d", max ( al, a2));

The output will be - 

     compilation error,
    run time error, 


ANSWER= (C) (Since, 8<9? 8:9=9)

 

19. The associativity of ! operator is

    Right to Left
    Left to Right
    (a) for Arithmetic and (b) for Relational
ANSWER= (A) Types 2nd options

 

20. Suppose 'a' is an unsigned int variable and the value is 0x6DB7. The expression A>>6 will result in -

    0xCCB6,
     0x0DB7,
    0x01BC
ANSWER= (D) 0x01B6

 

21. Null character is represented by

     \n
    \0
    \o
ANSWER= (B) \0

 

22. typedef is a - 

    keyword,
    predefined function 
    both (a) and (b)
ANSWER= (A) keyword,

 

23. A pointer to a pointer is a form of

    multiple indirections
     a chain of pointers
     both a and b
ANSWER= (C) both a and b

 

24. If a = -5 and b = -8 what is the value of a % b




ANSWER= (D)  (answer is -5)

 

25. C language was invented in the year.?

    1999
    1978
    1972

ANSWER= (C) 1972

 

26. '++' is a

     unary operator 
    binary operator
    ternary operator
ANSWER= (A) unary operator 

 

27. The maximum number of temporary variables needed to swap the contents of the variables is





ANSWER= (D) 0

 

28.  &&' operator - 

    left associative
    right associative
     can be used is left or right associative
ANSWER= (D) (left to right associative.)

 

29.  Let x an array. Which of the following cannot be present in the left-hand side of an assignment statement?

    x
    x + i
    * ( x + i)
ANSWER= a,b, c

 

30. The precedence of bitwise AND operator '&' over bitwise OR operator '|' -

    more
     less
    not specified
ANSWER= (A) more

 


  Friends if you like this post,kindly comment bellow and do share your responce.Thank You for Visiting.

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Top Post Ad

Below Post Ad