Type Here to Get Search Results !

C Programming MCQ with Answers [ SET - 4 ] | C Programming Quiz Questions and Answers pdf

 

C Programming Quiz Questions and Answers pdf

1. The Default Parameter Passing Mechanism is called as

     call by value
    call by reference
    call by address
ANSWER= (A) call by value

 

2.  What is Dequeue?

    elements can be added from front
    elements can be added to or removed from either the front or rear
     elements can be added from rear
ANSWER= (A) elements can be added from front

 

3. A variable can have - 

     r-value only, 
     l-value only,
     r-value and address,
ANSWER= (B)  l-value only,

 

4. Which bitwise operator is suitable for checking whether a particular bit is on or off? 

    && operator
     & operator
    || operator
ANSWER= (B) & operator

 

5. Suppose that i is an integer variable whose value is 7 and f is the floating-point variable whose value is 8.5. Evaluate the following expression : ( i + f)%4





ANSWER= (D)  Invalid

 

6. Which of the following is not a storage class supported by C++

    register
    auto
    mutable
ANSWER= (D) dynamic

 

7. In which order do the relational (i) arithmetic (2) logical (3) assignment (4) gets evaluated? 

    2134
    1234 
     4321 

ANSWER= (A) 2134

 

8. What will be output if you will compile and execute the following c code?

#include “string.h”

void main(){

clrscr();

printf(“%d %d”,sizeof(“string”),strlen(“string”));

getch();

}





ANSWER= (D) 7 6

 

9.C was developed in the year ___





ANSWER= (B) 1972

 

10. Which of the following is the correct order of evaluation for the below. expression? z = x+y*z/4%2-1

     */%+-=
    =*/%+
    /*%-+=
ANSWER= (A)  */%+-=

 

11. What will be output if you will compile and execute the following c code?

void main(){

static main;

int x;

x=call(main);

clrscr();

printf(“%d “,x);

getch();

}

int call(int address){

address++;

return address;

}



    Garbage value
ANSWER= (A) 1

 

12. C is a ___ language

    High Level
    Low Level
    Middle Level
ANSWER= (C) Middle Level

 

13. C language is available for which of the following Operating Systems?

    DOS
     Windows
     Unix
ANSWER= (D)  All of these

 

14. Which of the following correctly shows the hierarchy of arithmetic operations in C ?

    /+*
    *-/+ 
    +-/* 
ANSWER= (D) /*+

 

15. What is the control character for “a floating point number”.

    %c
    %d
    %i
ANSWER= (D) %f

 

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

    -3.4e38 to 3.4e38
    -32767 to 32768
    -32768 to 32767

ANSWER= (C) -32768 to 32767

 

17. Which of the following is the correct usage of conditional operators used in C ?

    a>b? c=30:c=40
    a>b? c= 30;
    max=a> b? a>c? a:c:b>c?b:c
ANSWER= (C) max=a> b? a>c? a:c:b>c?b:c

 

18. What is Dequeue?

    Elements can be added from front
    Elements can be added to or removed from either the front or rear
    Elements can be added from rear
ANSWER= (B) Elements can be added to or removed from either the front or rear

 

19. High level language is a .?

    Human readable like language.
    language with small program size.
    language with big program size.
ANSWER= (A) Human readable like language.

 

20. Is the following statement a declaration or definition? extern int i;

    Declaration
    Definition
    Function
ANSWER= (A) Declaration

 

21. Which program outputs "Hello World.." .?


    main()

    {

      scanf("Hello World..");

    }

    main()

    {

      printf("Hello World..");

    }

    main()

    {

      print("Hello World..");

    }


ANSWER= (B) 

 

22. Which of the following function is more appropriate for reading in a multi-word string? 

     printf();
    scanf();
     gets();
ANSWER= (C)  gets();

 

23. The statement p r I n t f (‘’ % d’’, 10?0?5 : 11: 12); prints





ANSWER= (A) 11

 

24. The && and || operators compare two

    boolean values
    boolean value
     numeric values
ANSWER= (B) boolean value

 

25. By default a variable is assigned with__________in static storage class

     garbage



ANSWER= (B) 1

 

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

     an editor
    . a compiler
    an operating system
ANSWER= (B) a compiler

 

27. A C variable cannot start with

     an alphabet
     a number
     a special symbol other than underscore
ANSWER= (D) both (b) and (c)

 

28. A. Constant


    ariable
    special symbol
ANSWER= (A) B

 

29. In a passage of text individual words and punctuation marks are called

    Tokens
    Strings
    Operator
ANSWER= (A) Tokens

 

30. The output of the following program segment will be:


void main()

{

int x-4, y=3, z;

z=x---y; 

printf("\n%d%d%d",x,y,z); 

}





ANSWER= (B) 331

 

Related Quaries:
c programming quiz questions and answers pdf
c programming questions and answers pdf
100 multiple choice questions in c programming with answers
c programming quiz pdf
c programming multiple choice questions and answers doc
if the function returns no value then it is called
mcq on programming languages with answers pdf
the function scanf is used to



  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