C++ MCQ Book
C++ MCQ Book
C++ MCQ Book
C++ MCQ
Q1: Who invented C++?
A) Dennis Ritchie
B) Ken Thompson
C) Brian Kernighan
D) Bjarne Stroustrup
Answer: Bjarne Stroustrup
Q3: Which of the following is the correct syntax of including a user defined header files in C++?
A) #include [userdefined]
B) #include “userdefined”
C) #include <userdefined.h>
D) #include <userdefined>
Answer: #include “userdefined”
Q4: Which of the following user-defined header file extension used in c++?
A) hg
B) cpp
C) h
D) hf
Answer: h
1|P ag e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
A) Left-right
B) Right-left
C) Bottom-up
D) Top-down
Answer: Bottom-up
Q9: By default, all the files in C++ are opened in _________ mode.
A) Binary
B) VTC
C) Text
D) ISCII
Answer: Text
2|P ag e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
D) call by reference
Answer: call by reference
Q14: Which of the following is used to terminate the function declaration in C++?
A) ;
B) ]
C) )
D) :
Answer: ;
Q16: The C++ code which causes abnormal termination/behaviour of a program should be written
under _________ block.
A) catch
B) throw
C) try
D) finally
Answer: try
Q18: Which of the following symbol is used to declare the preprocessor directives in C++?
A) $
B) ^
C) #
D) *
Answer: #
3|P ag e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
Q20: Pick the incorrect statement about inline functions in C++?
A) Saves overhead of a return call from a function
B) They are generally very large and complicated function
C) These functions are inserted/substituted at the point of call
D) They reduce function call overheads
Answer: They are generally very large and complicated function
Q21: Which concept allows you to reuse the written code in C++?
A) Inheritance
B) Polymorphism
C) Abstraction
D) Encapsulation
Answer: Inheritance
Q25: What would happen in case one uses a void in the passing of an argument?
A) It would return any value
B) It may not or may depend on a declared return type of any function. The return type of the
function is different from the passed arguments
C) It would return some value to the caller
D) It would not return any value to the caller
Answer: It would not return any value to the caller
Q26: __________ is an ability of grouping certain lines of code that we need to include in our
program?
A) macros
4|P ag e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
B) modularization
C) program control
D) specific task
Answer: modularization
Q27: Which of these keywords do we use for the declaration of the friend function?
A) myfriend
B) classfriend
C) friend
D) firend
Answer: friend
Q30: What handler do we use if we want to handle all the types of exceptions?
A) try-catch handler
B) catch-none handler
C) catch-all handler
D) catch handler
Answer: catch-all handler
5|P ag e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
Answer: Polymorphic
Q33: Which header file do we use for the generation of random numbers?
A) <random>
B) <generator>
C) <distribution>
D) <gen_dist>
Answer: <random>
Q34: Which container is the best for keeping a collection of various distinct elements?
A) queue
B) set
C) heap
D) multimap
Answer: set
Q37: Which of these functions is used for incrementing the iterator by a certain value?
A) move()
B) prev()
C) advance()
D) next()
Answer: advance()
Q38: Which of these mathematics libraries is used in C++ for vector manipulation?
A) blitz++
B) stac++
C) vec++
D) cli+++
Answer: blitz++
Q39: Which of these operators is used in order to capture every external variable by reference?
6|P ag e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
A) *
B) &&
C) &
D) =
Answer: =
7|P ag e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
D) Empty Class
Answer: A class with atleast one pure virtual function
8|P ag e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
A) GC++
B) KDevelop
C) GIT
D) Valgrind
Answer: Valgrind
9|P ag e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
D) C++20
Answer: C++11
Q60: Which of the following is the least safe type casting in C++?
A) static_cast
B) const_cast
C) reinterpret_cast
D) dynamic_cast
Answer: reinterpret_cast
Q64: Which part of memory is used for the allocation of local variables declared inside any
function.
A) Heap
B) Stack
C) Address Space
D) Depends on Compiler
Answer: Stack
10 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
Q65: What is the extention of the executable file produced after compiling C/C++ code using g++
on Linux?
A) .exe
B) .out
C) .lib
D) .a
Answer: .out
Q71: What is a constant that contains a single character enclosed within single quotes?
A) Character
11 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
B) Numeric
C) Fixed
D) Floating point
Answer: Character
Q76: Signed, unsigned, long and short are some of the ___
A) Void
B) Data
C) Derived data
D) Modifiers
Answer: Modifiers
Q77: Logical AND (&&) and Logical OR (||) are ___ operators.
A) Logical
B) Equality
C) Class member
D) Comma
12 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
Answer: Logical
Q78: ____ operators have lower precedence to relational and arithmetic operators.
A) Conditional
B) Boolean
C) Logical
D) Relational
Answer: Relational
Q80: Integer values are stored in ___ bit format in binary form.
A) 8
B) 16
C) 32
D) 64
Answer: 16
13 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
A) Logical
B) Binary
C) Unary
D) Ternary
Answer: Binary
14 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
D) BASIC
Answer: C++
Q92: ____ is an operator which returns the memory size requirements in terms of bytes.
A) Double
B) Size
C) Size of
D) Long
Answer: Size of
Q93: ____ class is another qualifier that can be added to a variable declaration.
A) Register
B) Static
C) Sub
D) Storage
Answer: Storage
Q94: ____ storage class global variable known to all functions in the current program.
A) Register
B) Extern
C) Static
D) Auto
Answer: Extern
Q95: _____ are the kind of data that variables hold in a programming language.
A) Conditional type
B) Constant type
C) Variable type
D) Data types
Answer: Data types
Q96: The operands and the operators are grouped in a specific logical way of evaluation is called
____
A) Assignment
B) Association
C) Arithmetic
D) Class
Answer: Association
15 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
Q97: Which one gives special meaning to the language compiler?
A) Constant
B) Variable
C) Keywords
D) Compiler
Answer: Compiler
Q98: ___ data type to indicate the function does not return a value.
A) Static
B) Main
C) Public
D) Void
Answer: Public
Q100: In a class specified, data or functions and designated private are accessible
A) Only to public members of class
B) Only if you know the password
C) To any function in the program
D) To member functions of that class
Answer: To member functions of that class
Q102: In C++ programming language, to write data that contains variables of type flat to an object
of type of stream, which of the following should be used?
A) Put ( )
B) Seekg ( )
C) Write ( )
D) Insertion operator
Answer: Write ( )
Q103: The special characters like tab, backspace, line feed, null, back slash are called ____
character constant
A) Floating
16 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
B) String
C) Graphic
D) Non-graphic
Answer: Non-graphic
Q105: For example class boy, ____ is a user defined data type of class.
A) Class
B) Type
C) Boy
D) User
Answer: Boy
Q108: What is the default file extension for all Word documents?
A) FIL
B) DOC
C) WRD
D) TXT
Answer: DOC
Q109: The ____ key and the ___ key can be used in combination with other keys to perform
shortcuts and special tasks.
A) Control, Alt
B) Function, toggle
C) Delete, Insert
17 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
D) Caps Lock, Num Lock
Answer: Control, Alt
Q112: The programming language that has the ability to create new data types is
called_______________
A) Overloaded
B) Extensible
C) Reprehensible
D) Encapsulated
Answer: Extensible
Q113: Which of the following is the correct syntax to read the single character to console in the
C++ language?
A) get(ch)
B) Scanf(ch)
C) Read ch()
D) Getline vh()
Answer: get(ch)
Q114: 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) 88
B) 4
C) 5
D) 3
Answer: 4
Q115: How many types of the array are there in the C++ programming language?
A) In the C++ programming language, there are four types of arrays
B) In the C++ programming language, there are three types of arrays
18 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
C) In the C++ programming language, there are two types of arrays
D) In the C++ programming language, there are six types of arrays
Answer: In the C++ programming language, there are two types of arrays
Q116: Which of the following can be considered as the correct syntax for declaring an array of
pointers of integers that has a size of 10 in C++?
A) int *arr = new int*[10]
B) int *arr = new int[10];
C) int arr = new int[10];
D) int **arr = new int*[10];
Answer: int **arr = new int*[10];
Q117: In which type of constant the Decimal numbers, integer and floating-point are related?
A) Numeric
B) String
C) Char
D) Boolean
Answer: Numeric
A) Class
B) Return
C) Constants
D) Variable
Answer: Constants
Q121: Which storage class defines local variable known to the block in which they are defined?
A) Register
B) Auto
C) Extern
19 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
D) Static
Answer: Auto
Q122: ____ allows users to define the user defined data type identifier.
A) Class
B) Data
C) Identifier
D) Type definition
Answer: Type definition
Q124: The names beginning with an underscore are reserved for _____ variable.
A) Globar
B) Local
C) Internal system
D) External system
Answer: Internal system
A) {}
B) []
C) ()
D) /
Answer: {}
Q126: ____ refers to the process of changing the data type of the value stored in a variable.
A) Type char
B) Type Int
C) Type Float
D) Type cast
Answer: Type cast
Q127: ____ data types are structure, union, class and enumeration.
A) Derived
20 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
B) Integer
C) Built-in
D) User defined
Answer: User defined
Q129: ____ allocates memory, based on the data type of the variable.
A) Interpreter
B) Link
C) Converter
D) Compiler
Answer: Compiler
Q130: Redirection redirects
A) Screen from a device to a stream
B) A device from the screen to a file
C) A stream from a file to the screen
D) A file from a device to a stream
Answer: A stream from a file to the screen
21 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
Q134: The dot operator connects which of the following two entities?
A) Class object and member of that class
B) Class and member of that class
C) Class object and a class
D) Class member and class object
Answer: Class object and member of that class
22 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
D) Each link contains a pointer to the next link
Answer: Each link contains a pointer to the next link
23 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
Q146: Classes are useful because they
A) Can closely model objects in the real world
B) Bring together all aspects of an entity in one place
C) Permit data to be hidden from other classes
D) Are removed from memory when not in use
Answer: Permit data to be hidden from other classes
Q150: #include<userdefined.h> Which of the following is the correct syntax to add the header file
in the C++ program?
A) #include<userdefined>
B) #include "userdefined.h"
C) <include> "userdefined.h"
D) Both #include<userdefined> , #include "userdefined.h"
Answer: Both #include<userdefined> , #include "userdefined.h"
24 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
152. What is virtual inheritance in C++?
a) C++ technique to enhance multiple inheritance
b) C++ technique to ensure that a private member of the base class can be accessed somehow
c) C++ technique to avoid multiple inheritances of classes
d) C++ technique to avoid multiple copies of the base class into children/derived class
Ans: d) C++ technique to avoid multiple copies of the base class into children/derived class
Ans : d) delete is used to delete single object whereas delete[] is used to multiple(array/pointer of)
objects
Ans: c) this pointer is passed as a hidden argument in all non-static functions of a class
Ans : d) Class specifically used as a base class with atleast one pure virtual functions
156. Which of the following constructors are provided by the C++ compiler if not defined in a class?
a) Copy constructor
b) Default constructor
c) Assignment constructor
d) All of the mentioned
25 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
Ans: b) In Structures, members are public by default whereas, in Classes, they are private by default
158 What is the benefit of c++ input and output over c input and output?
a) Both Type safety & Exception
b) Sequence container
c) Exception
d) Type safety
159. Wrapping data and its related functionality into a single entity is known as _____________
a) Abstraction
b) Encapsulation
c) Polymorphism
d) Modularity
Ans : b) Encapsulation
Ans : c) Inheritance
Ans : c) A,B->C
26 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
Ans : b) They allows us to show only required things to outer world
166. Which of the following class allows to declare only one object of it?
a) Abstract class
b) Virtual class
c) Singleton class
d) Friend class
Ans : b) Derived class pointer object cannot point to a base class object
27 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
Ans : b) Friend function
170. What is the other name used for functions inside a class?
a) Member variables
b) Member functions
c) Class functions
d) Class variables
Ans : c) Object
173. Which of the following provides a programmer with the facility of using object of a class inside other
classes?
a) Inheritance
b) Composition
c) Abstraction
d) Encapsulation
Ans : b) Composition
Ans : b) 2
28 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
c) Using Templates
d) Using Inheritance and Virtual functions
Ans : b) float
178. Which concept means the addition of new components to a program as it runs?
a) Data hiding
b) Dynamic binding
c) Dynamic loading
d) Dynamic typing
ANS : b) <<
181. Which of the following cannot be used with the virtual keyword?
a) Class
29 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
b) Member functions
c) Constructors
d) Destructors
ANS : c) Constructors
184. Which of the following supports the concept that reusability is a desirable feature of a language?
a) It reduces the testing time
b) It reduces maintenance cost
c) It decreases the compilation time
d) It reduced both testing and maintenance time
30 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
187. Which of the following is not a type of inheritance?
a) Multiple
b) Multilevel
c) Distributive
d) Hierarchical
ANS : c) Distributive
ANS : a) I only
190. Which members are inherited but are not accessible in any case?
a) Private
b) Public
c) Protected
d) Both private and protected
ANS : a) Private
31 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
c) Class members are public by default
d) Structure members are private by default
195. Which of the following is not a fundamental type is not present in C but present in C++?
a) int
b) float
c) bool
d) void
ANS : c) bool
ANS : a) 1 bit
ANS : a) cin
32 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
b) cout
c) print
d) input
ANS : b) cout
199. Which of the following is the correct difference between cin and scanf()?
a) both are the same
b) cin is a stream object whereas scanf() is a function
c) scanf() is a stream object whereas cin is a function
d) cin is used for printing whereas scanf() is used for reading inpu0074
ANS : c) do-while
ANS : a) The process of linking the actual code with a procedural call during run-time
ANS : b) The process of linking the actual code with a procedural call during compile-time
33 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
204. What is name mangling in C++?
a) The process of adding more information to a function name so that it can be distinguished from other
functions by the compiler
b) The process of making common names for all the function of C++ program for better use
c) The process of changing the names of variable
d) The process of declaring variables of different types
ANS : a) The process of adding more information to a function name so that it can be distinguished from
other functions by the compiler
205. Which of the following syntax for declaring a variable of struct STRUCT can be used in both C and
C++?
a) struct STRUCT S;
b) STRUCT S;
c) Both struct STRUCT S; and STRUCT S;
d) Both C and C++ have different syntax
ANS : c) void
34 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
c) tab
d) form feed
ANS : a) alert
ANS : b) Boolean
a) f is a function taking an argument of type int and returning a floating point number
b) f is a function taking an argument of type float and returning an integer
c) f is a function of type float
d) f is a function of type int
213. The value 132.54 can be represented using which data type?
a) double
b) void
c) int
d) bool
ANS : a) double
214. When a language has the capability to produce new data type mean, it can be called as
a) overloaded
b) extensible
c) encapsulated
d) reprehensible
AND : b) extensible
35 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
215. Is bool a fundamental data type in C++?
a) Yes
b) No, it is a typedef of unsigned char
c) No, it is an enum of {false, true}
d) No, it is expanded from macros
ANS : a) Yes
ANS : d) std::vector<bool>
ANS : b) bool cannot be used as the type of the result of the function
219. For what values of the expression is an if-statement block not executed?
a) 0 and all negative values
b) 0 and -1
c) 0
d) 0, all negative values, all positive values except 1
ANS: c) 0
220. Which of the two operators ++ and — work for the bool data type in C++?
a) None
b) ++
c) —
d) ++ & —
ANS : b) ++
36 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
221. The size_t integer type in C++ is?
a) Unsigned integer of at least 64 bits
b) Signed integer of at least 16 bits
c) Unsigned integer of at least 16 bits
d) Signed integer of at least 64 bits
222. Which of these expressions will return true if the input integer v is a power of two?
a) (v | (v + 1)) == 0;
b) (~v & (v – 1)) == 0;
c) (v | (v – 1)) == 0;
d) (v & (v – 1)) == 0;
223. Which of these expressions will make the rightmost set bit zero in an input integer x?
a) x = x | (x-1)
b) x = x & (x-1)
c) x = x | (x+1)
d) x = x & (x+2)
224. Which of these expressions will isolate the rightmost set bit?
a) x = x & (~x)
b) x = x ^ (~x)
c) x = x & (-x)
d) x = x ^ (-x)
225. 0946, 786427373824, ‘x’ and 0X2f are _____ _____ ____ and _____ literals respectively.
a) decimal, character, octal, hexadecimal
b) octal, hexadecimal, character, decimal
c) hexadecimal, octal, decimal, character
d) octal, decimal, character, hexadecimal
226. Which of the following is not one of the sizes of the floating point types?
a) short float
b) float
c) long double
d) double
37 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
227. Which of the following is a valid floating-point literal?
a) f287.333
b) F287.333
c) 287.e2
d) 287.3.e2
ANS : c) 287.e2
229. Which of three sizes of floating point types should be used when extended precision is required?
a) float
b) double
c) long double
d) extended float
ANS : a) F or f
231. Which is correct with respect to the size of the data types?
a) char > int < float
b) int < char > float
c) char < int < float
d) char < int < double
232. The size of an object or a type can be determined using which operator?
a) malloc
b) sizeof
c) malloc
d) calloc
ANS : b) sizeof
38 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
233. It is guaranteed that a ____ has at least 8 bits and a ____ has at least 16 bits.
a) int, float
b) char, int
c) bool, char
d) char, short
ANS : b) <limits>
235. Size of C++ objects are expressed in terms of multiples of the size of a ____ and the size of a char is
_______
a) char, 1
b) int, 1
c) float, 8
d) char, 4
ANS : a) char, 1
ANS : b) void
39 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
AND : d) none of the mentioned
ANS : b) integer
40 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
ANS : a) int variable
246. What is the index number of the last element of an array with 9 elements?
a) 9
b) 8
c) 0
d) Programmer-defined
Ans : b) 8
Ans : a) An array is a series of elements of the same type in contiguous memory locations
248. Which of the following accesses the seventh element stored in array?
a) array[6];
b) array[7];
c) array(7);
d) array;
Ans : a) array[6];
249. Which of the following gives the memory address of the first element in array?
a) array[0];
b) array[1];
c) array(2);
d) array;
Ans : d) array;
int(*p[5])();
41 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
a) p is pointer to function
b) p is array of pointer to function
c) p is pointer to such function which return type is the array
d) p is pointer to array of function
ANS : b) 4
ANS : c) literals
255. Which of the following statement is not true about preprocessor directives?
a) These are lines read and processed by the preprocessor
b) They do not produce any code by themselves
c) These must be written on their own line
d) They end with a semicolon
42 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
256. The difference between x and ‘x’ is?
a) The first one refers to a variable whose identifier is x and the second one refers to the character
constant x
b) The first one is a character constant x and the second one is the string literal x
c) Both are same
d) Both are string literal
ANS : a) The first one refers to a variable whose identifier is x and the second one refers to the character
constant x
ANS : a) L prefix
ANS : a) References are an alias for a variable whereas pointer stores the address of a variable
43 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
c) Reference should not be initialized when created
d) Reference is the same as pointers
ANS : b) &
ANS: a) 1
264. How many types of constructors are available, in general, in any language?
a) 2
b) 3
c) 4
d) 5
ANS : b) 3
265. Which constructor is called while assigning some object with another?
a) Default
b) Parameterized
c) Copy
d) Direct assignment is used
ANS: c) Copy
266. It’s necessary to pass object by reference in copy constructor because ____________
a) Constructor is not called in pass by reference
b) Constructor is called in pass by reference only
c) It passes the address of new constructor to be created
d) It passes the address of new object to be created
44 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
b) Protected
c) Implicit
d) Explicit
ANS : d) Explicit
ANS : b) Called at first time when an object is created and only one time
45 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
273. Within a class, only one static constructor can be created.
a) True
b) False
ANS : a) True
ANS : d) Creates an object by initializing it with another previously created object of same class
46 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
279. If two classes have exactly same data members and member function and only they differ by class
name. Can copy constructor be used to initialize one class object with another class object?
a) Yes, possible
b) Yes, because the members are same
c) No, not possible
d) No, but possible if constructor is also same
281. The data elements in the structure are also known as what?
a) objects
b) members
c) data
d) objects & data
Ans : b) members
Ans : c) ;
47 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
c) structure specifier
d) structure creator & signifier
Ans : a) b->var;
Ans : a) isalpha()
Ans : b) isalnum()
Ans : c) isdigit()
48 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
b) isalnum()
c) isdigit()
d) isblank()
Ans : d) isblank()
291. Which function is used to check whether a character is tab or space or whitespace control
code(\n,\r,etc.)?
a) isspace()
b) isalnum()
c) iscntrl()
d) isblank()
Ans : a) isspace()
292. Which function is used to check whether a character is tab or a control code?
a) isspace()
b) isalnum()
c) iscntrl()
d) isblank()
Ans : c) iscntrl()
Ans : b) isprint()
Ans : a) isxdigit()
Ans : d) ispunct()
49 | P a g e
VELOCIS EDUCATION C ++ MCQ MASTERY GUIDE
296. Which types of input are accepted in toupper(c)?
a) char
b) char *
c) float
d) Both char and char *
Ans : a) char
297. What is the difference in the ASCII value of capital and non-capital of the same letter is?
a) 1
b) 16
c) 32
d) Depends with compiler
Ans : c) 32
Ans : a) True
299. How many characters for pushback is guaranteed per file while using ungetc(c, fp);?
a) Only 1 character
b) Characters within 1 word
c) Characters within 1st new-line
d) All characters upto NULL character
50 | P a g e