Computer Science Study Materials for Competitive Exams

Sample Questions, Previous Year Solved Papers, Study Materials For Competitive Examinations Like UGC NET, SET And GATE Computer Science.

Thursday, 3 November 2016

C & C++ Programming Multiple Choice Questions - Set 31

1.       What is the output of the following statement:
printf (“%-3d”,12345);
(A) 1 2 3                         (B) -1 2 3
(C) 1 2 3 4 5                  (D) 12
Answer: C
printf statement would print 12345.
2.       A single character input from the keyboard can be obtained by using the function.
(A) printf ()                     (B) scanf ()
(C) putchar ()                (D) getchar ()
Answer: D
Reading a single character can be done by using the function getchar().
3.       Which of the following language is a subset of C++ language?
(A) C language                        (B) Java Language
(C) C# language          (D) B language
Answer: A
4.       Which of the following correctly describes C++ language?
(A) Statically typed language
(B) Dynamically typed language
(C) Both Statically and dynamically typed language
(D) Type-less language
Answer: A
5.       Which of the following keyword supports dynamic method resolution?
(A) Abstract                   (B) Virtual
(C) Dynamic                 (D) Typeid
Answer: B

6.       Which of the following concept is not supported by C++?
(A) Exception Handling                      (B) Reflection
(C) Operator Overloading                   (D) Namespaces
Answer: B
7.       Which of the following language feature is not an access specifier in C++?
(A) Public                      (B) Private
(C) Protected                (D) Internal
Answer: D
8.       What does STL stand for?
(A) Simple Template Library              (B) Standard Template Library
(C) Static Type Library                        (D) Single Type-based Library
Answer: B
9.       Which of the following is the most common way of implementing C++?
(A) C++ programs are directly compiled into native code by a compiler
(B) C++ programs are first compiled to intermediate code by a compiler and then executed by a virtual machine
(C) C++ programs are interpreted by an interpreter
(D) A C++ editor directly compiles and executes the program
Answer: A
10.    What is the implicit pointer that is passed as the first argument for non-static member functions?
(A) self pointer             (B) std::auto_ptr pointer
(C) Myself pointer        (D) this pointer
Answer: D


  1. This post was quite awesome and interesting to read. Congrats for your work. Thanks a lot for providing this with us. Keep on updating this with us regularly.

  2. The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
    msbi online training