Unlimited Online Free Software Download! Get 100% Free Hurry up!
Q. 1   What is the 16-bit compiler allowable range for integer constants ?
  • Correct Answer: D. -32768 to 32767

Q. 2   What is required in each C program ?
  • Correct Answer: A. The program must have at least one function.

Q. 3   Which of the following comment is correct when a macro definition includes arguments ?
  • Correct Answer: A. The opening parenthesis should immediately follow the macro name.

Q. 4   What is a lint ?
  • Correct Answer: C. Analyzing tool

Q. 5   What is the output of this statement ''printf(''%d'', (a++))'' ?
  • Correct Answer: B. The current value of a

Q. 6   Why is a macro used in place of a function ?
  • Correct Answer: A. It reduces execution time.

Q. 7   In the C language, the constant is defined _______.
  • Correct Answer: C. Anywhere, but starting on a new line.

Q. 8   A pointer is a memory address. Suppose the pointer variable has p address 1000, and that p is declared to have type int*, and an int is 4 bytes long. What address is represented by expression p + 2 ?
  • Correct Answer: D. 1008

Q. 9   Which one of the following is a loop construct that will always be executed once ?
  • Correct Answer: D. do while

Q. 10   How many characters can a string hold when declared as follows ? char name[20]:
  • Correct Answer: C. 20 char

Q. 11   Directives are translated by the
  • Correct Answer: A. Pre-processor

Q. 12   How many bytes does **int = D** use ?
  • Correct Answer: C. 2 or 4 bytes

Q. 13   What is the maximum number of characters that can be held in the string variable char address line [40] ?
  • Correct Answer: B. 39 characters

Q. 14   Which one is the correct description for the variable balance declared below ? int ** balance;
  • Correct Answer: B. Balance is a pointer to a pointer to an integer

Q. 15   Which of the following statement is not true ?
  • Correct Answer: B. A pointer must point to a data item on the heap (free store).

Q. 16   Let p1 be an integer pointer with a current value of 2000. What is the content of p1 after the expression p1++ has been evaluated ?
  • Correct Answer: C. 2004 value

Q. 17   Let p1 and p2 be integer pointers. Which one is a syntactically wrong statement ?
  • Correct Answer: A. p1 = p1 + p2;

Q. 18   Suppose that cPtr is a character pointer, and its current content is 300. What will be the new value in cPtr after the following assignment ? cPtr = cPtr + 5;
  • Correct Answer: A. value 305

Q. 19   Which is valid expression in C language ?
  • Correct Answer: B. int my_num = 100000;

Q. 20   Who is the father of C language ?
  • Correct Answer: C. Dennis Ritchie

Q. 21   All keywords in C are in ____________
  • Correct Answer: A. LowerCase letters

Q. 22   Which of the following is true for variable names in C ?
  • Correct Answer: C. Variable names cannot start with a digit

Q. 23   Which of the following cannot be a variable name in C ?
  • Correct Answer: A. volatile

Q. 24   Which of the following declaration is not supported by C language ?
  • Correct Answer: A. String str;

Q. 25   Which keyword is used to prevent any changes in the variable within a C program ?
  • Correct Answer: C. const

Q. 26   What is the result of logical or relational expression in C ?
  • Correct Answer: B. 0 or 1

Q. 27   Where in C the order of precedence of operators do not exist ?
  • Correct Answer: D. None of the mentioned

Q. 28   What is an example of iteration in C ?
  • Correct Answer: D. all of the mentioned

Q. 29   Functions can return enumeration constants in C ?
  • Correct Answer: A. true

Q. 30   Functions in C Language are always _________
  • Correct Answer: B. External

Q. 31   Which of following is not accepted in C ?
  • Correct Answer: C. static static int a; //a static variable prefixed with static

Q. 32   Property which allows to produce different executable for different platforms in C is called ?
  • Correct Answer: C. Conditional compilation

Q. 33   What is #include ?
  • Correct Answer: A. Preprocessor directive

Q. 34   C preprocessors can have compiler specific features.
  • Correct Answer: A. True

Q. 35   The C-preprocessors are specified with _________ symbol.
  • Correct Answer: A. #

Q. 36   How many number of pointer (*) does C have against a pointer variable declaration ?
  • Correct Answer: D. No limits

Q. 37   Which of the following is not possible statically in C language ?
  • Correct Answer: A. Jagged Array

Q. 38   which of the following return-type cannot be used for a function in C ?
  • Correct Answer: D. none of the mentioned

Q. 39   When a C program is started, O.S environment is responsible for opening file and providing pointer for that file ?
  • Correct Answer: D. All of the mentioned

Q. 40   In C language, FILE is of which data type ?
  • Correct Answer: C. struct

Q. 41   What is the sizeof(char) in a 32-bit C compiler ?
  • Correct Answer: C. 1 Byte

Q. 42   scanf() is a predefined function in______header file.
  • Correct Answer: C. stdio. h

Q. 43   C Language develop at‌‌‌‌______?
  • Correct Answer: A. AT & T's Bell Laboratories of USA in 1972

Q. 44   C programs are convert into machine language with help of
  • Correct Answer: B. A compiler

Q. 45   C was primarily Developed as
  • Correct Answer: A. System programming language

Q. 46   Standard ANSI C recongnizes________number of keyboards ?
  • Correct Answer: B. 32 keywords

Q. 47   C Language is a successor to which language ?
  • Correct Answer: D. B Language

Q. 48   C is a which level language ?
  • Correct Answer: B. High Level

Q. 49   Low level language is ?
  • Correct Answer: D. Difficult to understand and readability is questionable.

Q. 50   High level language is a ?
  • Correct Answer: A. Human readable like language.

Q. 51   C is _______ type of programming language ?
  • Correct Answer: B. Procedural

Q. 52   Who invented C++ ?
  • Correct Answer: D. Bjarne Stroustrup

Q. 53   Which of the following is used for comments in C++ ?
  • Correct Answer: D. both // comment or /* comment */

Q. 54   Which of the following is not a type of Constructor in C++ ?
  • Correct Answer: B. Friend constructor

Q. 55   Which of the following type is provided by C++ but not C ?
  • Correct Answer: C. bool

Q. 56   Which of the following correctly declares an array in C++ ?
  • Correct Answer: B. int array[10];

Q. 57   What is Inheritance in C++ ?
  • Correct Answer: A. Deriving new classes from existing classes

Q. 58   What is meant by a polymorphism in C++ ?
  • Correct Answer: B. class having many forms

Q. 59   What is abstract class in C++ ?
  • Correct Answer: C. Class specifically used as a base class with atleast one pure virtual functions

Q. 60   Which of the following constructors are provided by the C++ compiler if not defined in a class ?
  • Correct Answer: C. Default constructor

Q. 61   The operator used for dereferencing or indirection is ____
  • Correct Answer: A. *

Q. 62   What will happen in the following C++ code snippet ?
1. int a = 100, b = 200;
2. int *p = &a, *q = &b;
3. p = q;
  • Correct Answer: B. p now points to b

Q. 63   Which operator is used to signify the namespace ?
  • Correct Answer: C. scope-resolution operator

Q. 64   What does a class in C++ holds ?
  • Correct Answer: C. both data & functions

Q. 65   Which other keywords are also used to declare the class?
  • Correct Answer: A. class

Q. 66   The data members and functions of a class in C++ are by default ____________
  • Correct Answer: B. private

Q. 67   Constructors are used to ____________
  • Correct Answer: A. initialize the objects

Q. 68   Which of these following members are not accessed by using direct member access operator ?
  • Correct Answer: D. both private & protected

Q. 69   How many objects can present in a single class ?
  • Correct Answer: D. as many as possible

Q. 70   Which special character is used to mark the end of class ?
  • Correct Answer: A. ;

Q. 71   Which of the following operators can't be overloaded ?
  • Correct Answer: A. ::

Q. 72   Which keyword is used to represent a friend function ?
  • Correct Answer: A. friend

Q. 73   What is a friend function in C++ ?
  • Correct Answer: A. A function which can access all the private, protected and public members of a class

Q. 74   What is a function template ?
  • Correct Answer: A. creating a function without having to specify the exact type

Q. 75   What is the syntax of class template ?
  • Correct Answer: A. template <paramaters> class declaration

Q. 76   What is meant by multiple inheritance ?
  • Correct Answer: C. Deriving a derived class from more than one base class

Q. 77   Which of the following is the correct syntax to print the message in C++ language ?
  • Correct Answer: A. cout <<"Hello world!";

Q. 78   Which of the following is the address operator ?
  • Correct Answer: C. &

Q. 79   For inserting a new line in C++ program, which one of the following statements can be used ?
  • Correct Answer: A. \n

Q. 80   Which of the following refers to characteristics of an array ?
  • Correct Answer: A. An array is a set of similar data items

Q. 81   If we stored five elements or data items in an array, what will be the index address or the index number of the array's last data item ?
  • Correct Answer: B. 4 number

Q. 82   Wrapping data and its related functionality into a single entity is known as _____________
  • Correct Answer: B. Encapsulation

Q. 83   How many types of polymorphism are there in C++ ?
  • Correct Answer: B. 2 types

Q. 84   Which of the following is not a type of inheritance ?
  • Correct Answer: B. Distributive

Q. 85   Which of the following is called insertion operator ?
  • Correct Answer: A. <<

Q. 86   Which of the following is called extraction operator ?
  • Correct Answer: B. >>

Q. 87   What is the size of a boolean variable in C++ ?
  • Correct Answer: A. 1 bit

Q. 88   Which of the following is C++ equivalent for scanf() ?
  • Correct Answer: A. cin

Q. 89   Which of the following is the scope resolution operator ?
  • Correct Answer: C. ::

Q. 90   What is std in C++ ?
  • Correct Answer: B. std is a standard namespace in C++

Q. 91   Which of the following accesses the seventh element stored in array ?
  • Correct Answer: A. array[6];

Q. 92   What do vectors represent ?
  • Correct Answer: B. Dynamic arrays

Q. 93   Where does the execution of c++ program starts ?
  • Correct Answer: B. main() function

Q. 94   Which of the following correctly declares an array ?
  • Correct Answer: A. int array[10];

Q. 95   Which data type is used to represent the absence of parameters ?
  • Correct Answer: B. void

Q. 96   The value 132.54 can be represented using which data type ?
  • Correct Answer: A. float

Q. 97   What is syntax of defining a constructor of class A ?
  • Correct Answer: C. A()

Q. 98   Which function is used to open a file in C?
  • Correct Answer: B. fopen()

Q. 99   Which is the correct syntax to declare a file pointer in C?
  • Correct Answer: B. FILE *file_pointer;

Q. 100   Header files ___.
  • Correct Answer: D. All of these

Q. 101   The sqrt() function is used to calculate which value?
  • Correct Answer: C. Square root

Q. 102   A recursive function in C ___.
  • Correct Answer: A. Call itself again and again

Q. 103   A ___ can be assigned the address of any data type.
  • Correct Answer: C. Void pointer

Q. 104   Before using a pointer variable, it should be ___.
  • Correct Answer: C. Both A. and B.

Q. 105   Which of the following is the collection of different data types?
  • Correct Answer: A. structure

Q. 106   The size of a union is ___.
  • Correct Answer: C. Equal to size of largest data type

Q. 107   Which feature of OOPS described the reusability of code?
  • Correct Answer: D. Inheritance

Q. 108   A single program of OOPS contains _______ classes?
  • Correct Answer: D. Any number

Q. 109   Which operator from the following can be used to illustrate the feature of polymorphism?
  • Correct Answer: A. Overloading <<

Q. 110   Which header file is required by the C++ programming language to use the OOPS concept?
  • Correct Answer: D. We can easily use the OOPS concepts in c++ programs without using any header file

Q. 111   Which function best describe the concept of polymorphism in programming languages?
  • Correct Answer: B. Virtual function

Q. 112   Which of the following feature is also known as run-time binding or late binding?
  • Correct Answer: C. Dynamic binding