MCQ of C/C++ Programming Language – Set 7

This is another set of MCQ Question on the topic MCQ of C/CPP Programming. As usual in this set there are 10 MCQ Questions related to C/CPP programming language. Correct answer of this MCQ questions are given below of this question set.

MCQ of Microsoft Excel

Multiple Choice Questions of C, C++ Programming Language

7-1 Which of the following is/are storage class
A. Automatic
B. Static
C. Allocated
D. All of Above

7-2 What will the output of following code
{
int x = 10, y = 15;
x = x++;
y = ++y;           

printf(“%d, %d \n”, x, y);
}

A. 10, 15
B. 10, 16
C. 11, 16
D. 11, 15

7-3 NULL Pointer can be used as
A. To stop indirection in a recursive data structure
B. As an error value
C. As a sentinel Value
D. All of Above

7-4 Which one of the following is not the advantages of functions?
A. Debugging is easier
B. Testing is easier
C. Recursive call is possible
D. It consumes low disk space

7-5 What is the result of the following statement?
x = y = z = 0;

A. x = 0, y = Null, z = Null
B. x = 0, y = 0, z = 0
C. x = 0, y = 1, z = 2
D. the statement is incorrect

7-6 What is the result of the following statement?
X = 10;
y = ++x;

A. x = 10, y = 10
B. x = 10, y = 11
C. x = 11, y = 10
D. x = 11, y = 11

7-7 Which of the following statement creates infinite loop?
A. for  (  ;  ;  )
B. while (  ;  ;  )
C. when (  ;  ;  )
D. if(  ;  ;  )

7-8 The use of “break” Statement
A. to terminate a case in the switch statement
B. to force immediate termination of a loop
C. Both A & B
D. Only A

7-9 to use the function tolower(), which of the following header file should include
A. string.h
B. conio.h
C. ctype.h
D. Don’t need any header file

7-10 What is the function overloading?
A. Calling a function from another function
B. Having more than one functions of same name
C. Calling a function from itself
D. There is no such term in C/C++

 


 
Click Here for Answers

1 – D / 2 – C / 3 – D / 4 – D / 5 – B / 6 – D / 7 – A / 8 – C / 9 – C / 10 – B
 

14 Responses to “MCQ of C/C++ Programming Language – Set 7”

  1. Vyankatesh shirde 7 April 2012 at 11:01 PM

    It is gud place to test u,r skill

  2. Rohit Sharma 23 June 2012 at 6:34 PM

    test Your Brain

  3. maxx913 15 July 2012 at 11:54 AM

    Basics Test Rating : 4/10

  4. janki bhatt 17 July 2012 at 9:38 PM

    It’s really very basic and good questions for test or interview…It helps me a lot…..Thanks..

    • Ganesh Maharjan 22 July 2012 at 5:42 PM

      Thanks for your comment and glad to know that this site is helping you.

  5. Dinesh bathe 26 July 2012 at 11:28 PM

    Its better for me to test my knowledge And way to correct my mistakes.

  6. Mayson Kalarikkal 25 August 2012 at 7:03 PM

    thanks ganesh

  7. Ruchi Gour 11 February 2013 at 12:15 PM

    sir i m pursuing BE am i eligible for this ?

  8. Saddam Golandaj 13 December 2013 at 3:36 PM

    c++,java programming

    • ajmal 25 May 2014 at 5:52 PM

      Answer for the question 2 is wrong

      #include
      #include

      main()
      {
      int x=10, y=15;
      x=++x;
      y=++y;
      printf(“%d, %d \n”, x, y);

      }

      The answer is

      11, 16

      • ajmal 25 May 2014 at 5:56 PM

        Sorry our question is as follows:

        #include
        #include

        main()
        {
        int x=10, y=15;
        x=x++;
        y=++y;
        printf(“%d, %d \n”, x, y);

        }

        The answer is :

        10, 16 (Option B)

  9. James 8 April 2015 at 7:42 PM

    How can excel coding can select only 7 passed subjects from 10 subjects and finding the grading and divisions

  10. RUPESH ROSHAN 9 May 2017 at 2:37 PM

    No Kamal try and run the program you will get the output as 11 16


Leave a Reply

error: Content is protected !!