Unlimited Online Free Software Download! Get 100% Free
Hurry up!
Location: Bapunagar
Call: 800 053 0134
Email: info@hitechskillindia.in
Courses
CCC
Accounting
Software Development
Designing
Mobile Development
Digital Marketing
Specialized Courses
Live Project Training
Home
About
Placement Student's
Quiz
CCC Quiz
TallyPrime + GST Quiz
C, C++ Quiz
PHP Quiz
Laravel Quiz
React Quiz
NodeJS Quiz
Python Quiz
Java Quiz
WordPress Quiz
Digital Marketing Quiz
Front-End Quiz
Fullstack PHP Quiz
Fullstack Python Quiz
Fullstack Java Quiz
Fullstack WordPress Quiz
Fullstack NodeJS Quiz
Blog
Contact
E-Brochure
hot
Gallery
Career
We Are Hiring
Test Exam
Increase your skills
Inquiry Now
Home
About Us
Courses
CCC
Accounting
Software Development
hot
Designing
Mobile Development
new
Digital Marketing
Specialized Courses
new
Live Project Training
hot
Placement Student's
Quiz
CCC Quiz
TallyPrime + GST Quiz
C, C++ Quiz
PHP Quiz
Laravel Quiz
React Quiz
NodeJS Quiz
Python Quiz
Java Quiz
WordPress Quiz
Digital Marketing Quiz
Front-End Quiz
Fullstack PHP Quiz
Fullstack Python Quiz
Fullstack Java Quiz
Fullstack WordPress Quiz
Fullstack NodeJS Quiz
Blog
Contact Us
More
New
E-Brochure
hot
Gallery
Career
We Are Hiring
Test Exam
Increase your skills
C & C++ Quiz
Home
Quiz
C & C++ Quiz
Change Course
CCC Quiz
TallyPrime + GST Quiz
C, C++ Quiz
PHP Quiz
Laravel Quiz
React Quiz
NodeJS Quiz
Python Quiz
Java Quiz
WordPress Quiz
Digital Marketing Quiz
Front-End Quiz
Fullstack PHP Quiz
Fullstack Python Quiz
Fullstack Java Quiz
Fullstack WordPress Quiz
Fullstack NodeJS Quiz
Q.
1
What is the 16-bit compiler allowable range for integer constants ?
A.
-3.4e38 to 3.4e38
B.
-32767 to 32768
C.
-32668 to 32667
D.
-32768 to 32767
Correct Answer:
D. -32768 to 32767
Q.
2
What is required in each C program ?
A.
The program must have at least one function.
B.
The program does not require any function.
C.
Input data
D.
Output data
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 ?
A.
The opening parenthesis should immediately follow the macro name.
B.
There should be at least one blank between the macro name and the opening parenthesis
C.
There should be only one blank between the macro name and the opening parenthesis.
D.
All the above comments are correct.
Correct Answer:
A. The opening parenthesis should immediately follow the macro name.
Q.
4
What is a lint ?
A.
C compiler
B.
Interactive debugger
C.
Analyzing tool
D.
C interpreter
Correct Answer:
C. Analyzing tool
Q.
5
What is the output of this statement ''printf(''%d'', (a++))'' ?
A.
The value of (a + 1)
B.
The current value of a
C.
Error message
D.
Garbage
Correct Answer:
B. The current value of a
Q.
6
Why is a macro used in place of a function ?
A.
It reduces execution time.
B.
It reduces code size.
C.
It increases execution time.
D.
It increases code size.
Correct Answer:
A. It reduces execution time.
Q.
7
In the C language, the constant is defined _______.
A.
Before main
B.
After main
C.
Anywhere, but starting on a new line.
D.
None of the these.
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 ?
A.
1002
B.
1004
C.
1006
D.
1008
Correct Answer:
D. 1008
Q.
9
Which one of the following is a loop construct that will always be executed once ?
A.
for
B.
while
C.
switch
D.
do while
Correct Answer:
D. do while
Q.
10
How many characters can a string hold when declared as follows ? char name[20]:
A.
18 char
B.
19 char
C.
20 char
D.
None of the these
Correct Answer:
C. 20 char
Q.
11
Directives are translated by the
A.
Pre-processor
B.
Compiler
C.
Linker
D.
Editor
Correct Answer:
A. Pre-processor
Q.
12
How many bytes does **int = D** use ?
A.
0 bytes
B.
1 bytes
C.
2 or 4 bytes
D.
10 bytes
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] ?
A.
38 characters
B.
39 characters
C.
40 characters
D.
41 characters
Correct Answer:
B. 39 characters
Q.
14
Which one is the correct description for the variable balance declared below ? int ** balance;
A.
Balance is a point to an integer
B.
Balance is a pointer to a pointer to an integer
C.
Balance is a pointer to a pointer to a pointer to an integer
D.
Balance is an array of integer
Correct Answer:
B. Balance is a pointer to a pointer to an integer
Q.
15
Which of the following statement is not true ?
A.
A pointer to an int and a pointer to a double are of the same size.
B.
A pointer must point to a data item on the heap (free store).
C.
A pointer can be reassigned to point to another data item.
D.
A pointer can point to an array.
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 ?
A.
2001 value
B.
2002 value
C.
2004 value
D.
2008 value
Correct Answer:
C. 2004 value
Q.
17
Let p1 and p2 be integer pointers. Which one is a syntactically wrong statement ?
A.
p1 = p1 + p2;
B.
p1 = p1 - 9;
C.
p2 = p2 + 9;
D.
printf(**%d**,p1 - p2);
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;
A.
value 305
B.
value 310
C.
value 320
D.
value 340
Correct Answer:
A. value 305
Q.
19
Which is valid expression in C language ?
A.
int my_num = 100,000;
B.
int my_num = 100000;
C.
int my num = 1000;
D.
int my num == 10000;
Correct Answer:
B. int my_num = 100000;
Q.
20
Who is the father of C language ?
A.
Steve Jobs
B.
James Gosling
C.
Dennis Ritchie
D.
Rasmus Lerdorf
Correct Answer:
C. Dennis Ritchie
Q.
21
All keywords in C are in ____________
A.
LowerCase letters
B.
UpperCase letters
C.
CamelCase letters
D.
None of the mentioned
Correct Answer:
A. LowerCase letters
Q.
22
Which of the following is true for variable names in C ?
A.
FThey can contain alphanumeric characters as well as special characters
B.
It is not an error to declare a variable to be one of the keywords(like goto, static)
C.
Variable names cannot start with a digit
D.
Variable can be of any length
Correct Answer:
C. Variable names cannot start with a digit
Q.
23
Which of the following cannot be a variable name in C ?
A.
volatile
B.
true
C.
friend
D.
export
Correct Answer:
A. volatile
Q.
24
Which of the following declaration is not supported by C language ?
A.
String str;
B.
char *str;
C.
float str = 3e2;
D.
Both String str; & float str = 3e2;
Correct Answer:
A. String str;
Q.
25
Which keyword is used to prevent any changes in the variable within a C program ?
A.
immutable
B.
mutable
C.
const
D.
volatile
Correct Answer:
C. const
Q.
26
What is the result of logical or relational expression in C ?
A.
True or False
B.
0 or 1
C.
0 if an expression is false and any positive number if an expression is true
D.
None of the mentioned
Correct Answer:
B. 0 or 1
Q.
27
Where in C the order of precedence of operators do not exist ?
A.
Within conditional statements, if, else
B.
Within while, do-while
C.
Within a macro definition
D.
None of the mentioned
Correct Answer:
D. None of the mentioned
Q.
28
What is an example of iteration in C ?
A.
for
B.
while
C.
do-while
D.
all of the mentioned
Correct Answer:
D. all of the mentioned
Q.
29
Functions can return enumeration constants in C ?
A.
true
B.
false
C.
depends on the compiler
D.
depends on the standard
Correct Answer:
A. true
Q.
30
Functions in C Language are always _________
A.
Internal
B.
External
C.
Both Internal and External
D.
External and Internal are not valid terms for functions
Correct Answer:
B. External
Q.
31
Which of following is not accepted in C ?
A.
static a = 10; //static as
B.
static int func (int); //parameter as static
C.
static static int a; //a static variable prefixed with static
D.
all of the mentioned
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 ?
A.
File inclusion
B.
Selective inclusion
C.
Conditional compilation
D.
Recursive macros
Correct Answer:
C. Conditional compilation
Q.
33
What is #include ?
A.
Preprocessor directive
B.
Inclusion directive
C.
File inclusion directive
D.
None of the mentioned
Correct Answer:
A. Preprocessor directive
Q.
34
C preprocessors can have compiler specific features.
A.
True
B.
False
C.
Depends on the standard
D.
Depends on the platform
Correct Answer:
A. True
Q.
35
The C-preprocessors are specified with _________ symbol.
A.
#
B.
$
C.
""
D.
&
Correct Answer:
A. #
Q.
36
How many number of pointer (*) does C have against a pointer variable declaration ?
A.
7 pointer
B.
127 pointer
C.
255 pointer
D.
No limits
Correct Answer:
D. No limits
Q.
37
Which of the following is not possible statically in C language ?
A.
Jagged Array
B.
Rectangular Array
C.
Cuboidal Array
D.
Multidimensional Array
Correct Answer:
A. Jagged Array
Q.
38
which of the following return-type cannot be used for a function in C ?
A.
char *
B.
struct
C.
void
D.
none of the mentioned
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 ?
A.
Standard input
B.
Standard output
C.
Standard error
D.
All of the mentioned
Correct Answer:
D. All of the mentioned
Q.
40
In C language, FILE is of which data type ?
A.
int
B.
char *
C.
struct
D.
none of the mentioned
Correct Answer:
C. struct
Q.
41
What is the sizeof(char) in a 32-bit C compiler ?
A.
1 bit
B.
2 bits
C.
1 Byte
D.
2 Bytes
Correct Answer:
C. 1 Byte
Q.
42
scanf() is a predefined function in______header file.
A.
stdlib. h
B.
ctype. h
C.
stdio. h
D.
stdarg. h
Correct Answer:
C. stdio. h
Q.
43
C Language develop at‌‌‌‌______?
A.
AT & T's Bell Laboratories of USA in 1972
B.
AT & T's Bell Laboratories of USA in 1970
C.
Sun Microsystems in 1973
D.
Cambridge University in 1972
Correct Answer:
A. AT & T's Bell Laboratories of USA in 1972
Q.
44
C programs are convert into machine language with help of
A.
An Editor
B.
A compiler
C.
An operating system
D.
None of these.
Correct Answer:
B. A compiler
Q.
45
C was primarily Developed as
A.
System programming language
B.
General purpose language
C.
Data processing language
D.
None of the above.
Correct Answer:
A. System programming language
Q.
46
Standard ANSI C recongnizes________number of keyboards ?
A.
30 keywords
B.
32 keywords
C.
36 keywords
D.
24 keywords
Correct Answer:
B. 32 keywords
Q.
47
C Language is a successor to which language ?
A.
FORTRAN
B.
D Language
C.
BASIC
D.
B Language
Correct Answer:
D. B Language
Q.
48
C is a which level language ?
A.
Low Level
B.
High Level
C.
Low + High
D.
None
Correct Answer:
B. High Level
Q.
49
Low level language is ?
A.
Human readable like language.
B.
language with big program size.
C.
language with small program size.
D.
Difficult to understand and readability is questionable.
Correct Answer:
D. Difficult to understand and readability is questionable.
Q.
50
High level language is a ?
A.
Human readable like language.
B.
language with small program size.
C.
language with big program size.
D.
language which is difficult to understand and not human readable.
Correct Answer:
A. Human readable like language.
Q.
51
C is _______ type of programming language ?
A.
Object Oriented
B.
Procedural
C.
Bit level language
D.
Functional
Correct Answer:
B. Procedural
Q.
52
Who invented C++ ?
A.
Dennis Ritchie
B.
Ken Thompson
C.
Brian Kernighan
D.
Bjarne Stroustrup
Correct Answer:
D. Bjarne Stroustrup
Q.
53
Which of the following is used for comments in C++ ?
A.
/* comment */
B.
// comment */
C.
// comment
D.
both // comment or /* comment */
Correct Answer:
D. both // comment or /* comment */
Q.
54
Which of the following is not a type of Constructor in C++ ?
A.
Default constructor
B.
Friend constructor
C.
Parameterized constructor
D.
Copy constructor
Correct Answer:
B. Friend constructor
Q.
55
Which of the following type is provided by C++ but not C ?
A.
double
B.
float
C.
bool
D.
int
Correct Answer:
C. bool
Q.
56
Which of the following correctly declares an array in C++ ?
A.
array{10};
B.
int array[10];
C.
array array[10];
D.
int array;
Correct Answer:
B. int array[10];
Q.
57
What is Inheritance in C++ ?
A.
Deriving new classes from existing classes
B.
Overloading of classes
C.
Classes with same names
D.
Wrapping of data into a single class
Correct Answer:
A. Deriving new classes from existing classes
Q.
58
What is meant by a polymorphism in C++ ?
A.
class having only single form
B.
class having many forms
C.
class having four forms
D.
class having two forms
Correct Answer:
B. class having many forms
Q.
59
What is abstract class in C++ ?
A.
Any Class in C++ is an abstract class
B.
Class from which any class is derived
C.
Class specifically used as a base class with atleast one pure virtual functions
D.
Class specifically used as a base class with atleast one virtual functions
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 ?
A.
Copy constructor
B.
Assignment constructor
C.
Default constructor
D.
All of the mentioned
Correct Answer:
C. Default constructor
Q.
61
The operator used for dereferencing or indirection is ____
A.
*
B.
&
C.
->
D.
->>
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;
A.
b is assigned to a
B.
p now points to b
C.
a is assigned to b
D.
q now points to a
Correct Answer:
B. p now points to b
Q.
63
Which operator is used to signify the namespace ?
A.
conditional operator
B.
ternary operator
C.
scope-resolution operator
D.
bitwise operator
Correct Answer:
C. scope-resolution operator
Q.
64
What does a class in C++ holds ?
A.
data
B.
functions
C.
both data & functions
D.
arrays
Correct Answer:
C. both data & functions
Q.
65
Which other keywords are also used to declare the class?
A.
class
B.
union
C.
object
D.
struct
Correct Answer:
A. class
Q.
66
The data members and functions of a class in C++ are by default ____________
A.
protected
B.
private
C.
public
D.
public & protected
Correct Answer:
B. private
Q.
67
Constructors are used to ____________
A.
initialize the objects
B.
delete the objects
C.
construct the data members
D.
both initialize the objects & construct the data members
Correct Answer:
A. initialize the objects
Q.
68
Which of these following members are not accessed by using direct member access operator ?
A.
public
B.
private
C.
protected
D.
both private & protected
Correct Answer:
D. both private & protected
Q.
69
How many objects can present in a single class ?
A.
one
B.
two
C.
Three
D.
as many as possible
Correct Answer:
D. as many as possible
Q.
70
Which special character is used to mark the end of class ?
A.
;
B.
:
C.
#
D.
$
Correct Answer:
A. ;
Q.
71
Which of the following operators can't be overloaded ?
A.
::
B.
-
C.
+
D.
[]
Correct Answer:
A. ::
Q.
72
Which keyword is used to represent a friend function ?
A.
friend
B.
Friend
C.
friend_func
D.
Friend_func
Correct Answer:
A. friend
Q.
73
What is a friend function in C++ ?
A.
A function which can access all the private, protected and public members of a class
B.
A function which is not allowed to access any member of any class
C.
A function which is allowed to access public and protected members of a class
D.
A function which is allowed to access only public members of a class
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 ?
A.
creating a function without having to specify the exact type
B.
creating a function with having an exact type
C.
creating a function without class
D.
creating a function without having blank spaces
Correct Answer:
A. creating a function without having to specify the exact type
Q.
75
What is the syntax of class template ?
A.
template <paramaters> class declaration
B.
Template <paramaters> class declaration
C.
temp <paramaters> class declaration
D.
Temp <paramaters> class declaration
Correct Answer:
A. template <paramaters> class declaration
Q.
76
What is meant by multiple inheritance ?
A.
Deriving a base class from derived class
B.
Deriving a derived class from base class
C.
Deriving a derived class from more than one base class
D.
Deriving a derived base class
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 ?
A.
cout <<"Hello world!";
B.
Cout << Hello world! ;
C.
Out <<"Hello world!;
D.
None of the above
Correct Answer:
A. cout <<"Hello world!";
Q.
78
Which of the following is the address operator ?
A.
@
B.
#
C.
&
D.
%
Correct Answer:
C. &
Q.
79
For inserting a new line in C++ program, which one of the following statements can be used ?
A.
\n
B.
\r
C.
\a
D.
None of the above
Correct Answer:
A. \n
Q.
80
Which of the following refers to characteristics of an array ?
A.
An array is a set of similar data items
B.
An array is a set of distinct data items
C.
An array can hold different types of datatypes
D.
None of the above
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 ?
A.
3 number
B.
4 number
C.
5 number
D.
88 number
Correct Answer:
B. 4 number
Q.
82
Wrapping data and its related functionality into a single entity is known as _____________
A.
Abstraction
B.
Encapsulation
C.
Polymorphism
D.
Modularity
Correct Answer:
B. Encapsulation
Q.
83
How many types of polymorphism are there in C++ ?
A.
1 types
B.
2 types
C.
3 types
D.
4 types
Correct Answer:
B. 2 types
Q.
84
Which of the following is not a type of inheritance ?
A.
Multiple
B.
Distributive
C.
Multilevel
D.
Hierarchical
Correct Answer:
B. Distributive
Q.
85
Which of the following is called insertion operator ?
A.
<<
B.
>>
C.
>
D.
<
Correct Answer:
A. <<
Q.
86
Which of the following is called extraction operator ?
A.
<<
B.
>>
C.
>
D.
<
Correct Answer:
B. >>
Q.
87
What is the size of a boolean variable in C++ ?
A.
1 bit
B.
1 byte
C.
4 bytes
D.
2 bytes
Correct Answer:
A. 1 bit
Q.
88
Which of the following is C++ equivalent for scanf() ?
A.
cin
B.
cout
C.
print
D.
input
Correct Answer:
A. cin
Q.
89
Which of the following is the scope resolution operator ?
A.
.
B.
*
C.
::
D.
~
Correct Answer:
C. ::
Q.
90
What is std in C++ ?
A.
std is a standard class in C++
B.
std is a standard namespace in C++
C.
std is a standard file reading header in C++
D.
std is a standard file reading header 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 ?
A.
array[6];
B.
array[7];
C.
array[7];
D.
array;
Correct Answer:
A. array[6];
Q.
92
What do vectors represent ?
A.
Static arrays
B.
Dynamic arrays
C.
Stack
D.
Queue
Correct Answer:
B. Dynamic arrays
Q.
93
Where does the execution of c++ program starts ?
A.
user-defined() function
B.
main() function
C.
void() function
D.
else() function
Correct Answer:
B. main() function
Q.
94
Which of the following correctly declares an array ?
A.
int array[10];
B.
int array;
C.
array{10};
D.
array array[10];
Correct Answer:
A. int array[10];
Q.
95
Which data type is used to represent the absence of parameters ?
A.
int
B.
void
C.
short
D.
float
Correct Answer:
B. void
Q.
96
The value 132.54 can be represented using which data type ?
A.
float
B.
void
C.
int
D.
bool
Correct Answer:
A. float
Q.
97
What is syntax of defining a constructor of class A ?
A.
a()
B.
~A()
C.
A()
D.
~A();
Correct Answer:
C. A()
Q.
98
Which function is used to open a file in C?
A.
open()
B.
fopen()
C.
file_open()
D.
fileopen()
Correct Answer:
B. fopen()
Q.
99
Which is the correct syntax to declare a file pointer in C?
A.
File *file_pointer;
B.
FILE *file_pointer;
C.
File file_pointer;
D.
FILE file_pointer;
Correct Answer:
B. FILE *file_pointer;
Q.
100
Header files ___.
A.
Contain function declarations
B.
Can be included to a program
C.
End with .h extension
D.
All of these
Correct Answer:
D. All of these
Q.
101
The sqrt() function is used to calculate which value?
A.
Square
B.
Square of reverse bits
C.
Square root
D.
None of these
Correct Answer:
C. Square root
Q.
102
A recursive function in C ___.
A.
Call itself again and again
B.
Loop over a parameter
C.
Return multiple values
D.
None of these
Correct Answer:
A. Call itself again and again
Q.
103
A ___ can be assigned the address of any data type.
A.
Dangling pointer
B.
Wild pointer
C.
Void pointer
D.
Null pointer
Correct Answer:
C. Void pointer
Q.
104
Before using a pointer variable, it should be ___.
A.
Declared
B.
Initialized
C.
Both A. and B.
D.
None of the above
Correct Answer:
C. Both A. and B.
Q.
105
Which of the following is the collection of different data types?
A.
structure
B.
string
C.
array
D.
All of the above
Correct Answer:
A. structure
Q.
106
The size of a union is ___.
A.
Sum of sizes of all members
B.
Predefined by the compiler
C.
Equal to size of largest data type
D.
None of these
Correct Answer:
C. Equal to size of largest data type
Q.
107
Which feature of OOPS described the reusability of code?
A.
Abstraction
B.
Encapsulation
C.
Polymorphism
D.
Inheritance
Correct Answer:
D. Inheritance
Q.
108
A single program of OOPS contains _______ classes?
A.
Only 1
B.
Only 999
C.
Only 100
D.
Any number
Correct Answer:
D. Any number
Q.
109
Which operator from the following can be used to illustrate the feature of polymorphism?
A.
Overloading <<
B.
Overloading &&
C.
Overloading | |
D.
Overloading +=
Correct Answer:
A. Overloading <<
Q.
110
Which header file is required by the C++ programming language to use the OOPS concept?
A.
stdio.h
B.
iostream.h
C.
stdlib.h
D.
We can easily use the OOPS concepts in c++ programs without using any header file
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?
A.
Class member function
B.
Virtual function
C.
Inline function
D.
Undefined function
Correct Answer:
B. Virtual function
Q.
112
Which of the following feature is also known as run-time binding or late binding?
A.
Dynamic typing
B.
Dynamic loading
C.
Dynamic binding
D.
Data hiding
Correct Answer:
C. Dynamic binding