C C++ PROGRAMMING MODEL PAPER SET




1.       C was primarily developed as a:
(a)    System Programming
(b)   General Programming Purpose
(c)    Data structure
(d)   None of these
2.       Choose the correct answer:
(a)    Use of goto enhances the logical clarity of a code
(b)   Use of goto makes the debugging task easier
(c)    Use goto when you want to jump out of nested loop
(d)   Never use goto
3.       Length of the string “Correct” is :
(a)    7
(b)   8
(c)    6
(d)   1
4.       Int x,y=2,z,a;
x=(y*=2)+(z=a=y);
printf(“%d”,x);
(a)    7
(b)   6
(c)    8
(d)   Compile time error
5.       C is a
(a)    High level language
(b)   Low level language
(c)    High level language with some low level language
(d)   Machine language
6.       A destructor
(a)    Has a return type
(b)   Can have parameters
(c)    Has same name as class
(d)   None of the above
7.       The members of a class can be
(a)    Private
(b)   Public
(c)    Protected
(d)   All of the above
8.       The cin and cout functions require the header file
(a)    Conio.h
(b)   Iostream.h
(c)    Stdio.h
(d)   iomanip.h
9.       The default parameter passing mechanism is:
(a)    Call by value
(b)   Call by reference
(c)    Call by value result
(d)   None of the above
10.   By default a class member are
(a)    Public
(b)   Private
(c)    Protected
11.   By default a structure member are
(a)    Public
(b)   Private
(c)    Protected
(d)   Any of above
12.   Friend keyword can be used for
(a)    A function
(b)   A class
(c)    Both function and  class
(d)   A data member
13.   → operator used when
(a)    To access structure’s member
(b)   To access structure’s member when pointer declaration is using
(c)    To store data item from one structure to another structure
(d)   None of the above
14.   Which operator is highest priority?
(a)    Unary
(b)   Binary
(c)    Ternary
(d)   Coma
15.   A pointer is:
(a)    Address of variable
(b)   An indication of a variable to be accessed next
(c)    A variable for storing address
(d)   None of the above
16.   Switch statement is used for
(a)    Multiple selection
(b)   Two-set selection
(c)    Three-set selection
(d)   None of the above
17.   The language used making web pages is:
(a)    C++
(b)   Java
(c)    Prolog
(d)   Pascal
18.   Multithreading concept in a programming language was introduced in:
(a)    5GL
(b)   3GL
(c)    1GL
(d)   4GL
19.   To reference and object using a pointer to object , use to:
(a)    → operator
(b)   Dot operator
(c)    &(ampersand) operator
(d)   <> operator
20.   You are not allowed to call a ……….. member function from anywhere other than member function of the same class:
(a)    Protected
(b)   Public
(c)    Local
21.   A class is an……… that is defined by the programmer.
(a)    User defined variable type
(b)   Attributes
(c)    Method
(d)   Function
22.   A suitable place to store class declaration is :
(a)    Auxiliary.cpp file
(b)   Floppy disks
(c)    Their own file
(d)   None
23.   The member of a class can be:
(a)    Private
(b)   Protected
(c)    Public
(d)   Protected
24.   Which is these keywords are access specifies
(a)    Near and far
(b)   Table and row
(c)    Private and public
(d)   Opend and closed
25.   When the code of member function is defined inside a class declaration.
(a)    Conditionally
(b)   In-line
(c)    Static
(d)   Globally
26.   You can redefine the way….. work when used with objects.
(a)    Standard operators
(b)   Preprocessor directives
(c)    Whitespace   characters
(d)   Undefined variables
27.   Each and every operator of c++ can be overload. The statement is…
(a)    True
(b)   False
(c)    Conditional
(d)   None
28.   The principle of ……. Allows as to create new classes based on existing classes.
(a)     Inheritance
(b)   Function overloading
(c)    Copy construction
(d)   Polymorphism
29.   When you desire a class privately, a protected base class member becomes:
(a)    Public
(b)   Private
(c)    Explicit
(d)   Inherited
30.   Ability to make many forms is …..
(a)    Polymorphism
(b)   Encapsulation
(c)    Member function
31.   The run time system performs……… on virtual function:
(a)    Additional error checking
(b)   Static Binding
(c)    Dynamic Binding
(d)   None
32.   A method is declared virtual using keyword….
(a)    Private
(b)   Public
(c)    Protected
(d)   Virtual
33.   A…….. pointer can point to……. Object.
(a)    Derived class, base class
(b)   Void , derived class
(c)    Void, null
(d)   Base class, derived class
34.   Every c Program requires a ……… function.
(a)    Void function
(b)   Main function
(c)    Inline function
(d)   User defined function
35.   Every statement in a c language program ends with a….
(a)    Colon
(b)   Comma
(c)    Semicolon
(d)   Full stop
36.   For defining string constants in C…… are used:
(a)    Single Quotes
(b)   Double Quotes
(c)    Apostrophes
(d)   None
37.   The purpose of file buffer is:
(a)    Use Memory
(b)   To speed up input/output
(c)    To speed up arithmetic operations
(d)   To protect data
38.   The read single character from a  file, we use the member function….
(a)    Input
(b)   Get
(c)    Put
(d)   Read
39.   The …….. member function returns the true value when the end of file has been found:
(a)    done()
(b)   end()
(c)    cof()
(d)   stop()
40.   Garbage collector is the concept of :
(a)    Java
(b)   Basic
(c)    Prolog

No comments:

Post a Comment