CS201 Final Term
CS201 Final Term
98% confirm
1. Special name which is substituted in code by its definition and as a result we get an
expanded code is called
Macro
A+=1
Constructors
At runtime
Object
7. With the use of dynamic allocation of memory, the system resources can be .
Used efficiently
8. When we include the header file in the angle brackets the compiler searches for it in
.
Specific directory
Void
11. The memory allocation functions return a chunk of memory with a pointer of type
.
Void
No parameters
Only one
14. Which one of the following is mandatory preprocessor directive for c++?
#include <isotream?
15. Header files provide so the program running on one operating system can run
without an error on the other system
Accessibility
16. We should not use such variable names that are starting with because in C++
these are lots of internal constants and symbolic names that start with it.
Double underscore
17. Which of the following code segment represents a left shift operator?
Result= number<<1
18. Which of the following code segment represent a bitwise And operator?
&
20. Which of the following code segment represent a Bitwise Exclusive OR operator
^
Bejame stroustrup
23. For converting a void type pointer ptr into integer type, the correct syntax is:
int* ptr
24. A pointer with value NULL is defined in the header files and .
Stdlib.h stddef.h
Identifier
28. In shifting operations if zero is inserted at the left most bit, the negative number will become
a number.
Positive
29. A class is .
Uninitialized data
33. The function calloc takes two arguments, first argument is the _ and the second
argument is the .
Required space in terms of numbers, size of space
Two
36. When we include the header file in the angle brackets the compiler searches for it in
.
Specific directory
A class includes both data members as well as functions to manipulate that data
Exclusive OR
40. Header file provide so the program running on one operating system can run
without an error on the other system
Portability
Uninitialized data
46. The name of the destructor is the same as that of a class proceeding with a .
~sign
#define PI3, 14
Heap
Reloadable, executable
56. Constructor is a special type of function;
Compiler, no initialization
Definition of a marco
61. We cannot use pointer for storing and reading data from it
NULL
Free()
At runtime
65. An instance of a class is called .
Object
Void pointer, starting of the chunk of memory allocated from the heap
++
68. The constructor contains .
No return type
Dot.
Only one
71. Object code is machine code but it is not and .
Reloadable, executable
73. In C++ a variable can be declared anywhere in the program, this will increase .
Readability
76. The default visibility for the data members of the class is .
Private
78. Once we have defined a symbolic constant value using #define, that value during
program execution.
Cannot be changed
Call by value
81. Programmer should be very careful about the memory management because it can
.
8. Constructor has .
the same name as of class
10. We should not use such variable names that are starting with
because in C++, there are lots of internal constants and symbolic names that start with it.
stdlib.h
&
Dot operator
87. The statement cout << yptr will show the the yptr points to
Memory address
0-49
11
Null
92. In C++, what will be the highest index of the following array?
Int array{15}
14
93. Which of the following is a correct way to assign the address of the first element of array to
pointer? Int data[10];
aI=b;
97. Sometimes after allocating memory we need additional space, for this purpose we use
.
Realloc function
98. An integer uses four bytes and the integer calculations occur in bytes.
Decimal
Not operator
106. What can be the resultant number when you AND two numbers 12 & bit-wise using &
operator?
8
FILE NO 2
➢ For console input and output we use ?
➢ ???
➢ a += 1;
➢ Constractors
➢ At runtime
➢ Object
➢ With the use of dynamic allocation of memory, the system resources can be
➢ Use efficiently
➢ When we include the header file in the angle brackets the compiler searches for it in
➢ Specific directory
➢ Void
➢ Binary
➢ Special name which is substituted in code by its definition and as a result we get an expanded code is
➢ Called Macro
➢ For converting a void type pointer ptr into integer type, the correct syntax is
➢ int" ptr
➢ Header files provide so the program running on one operating system cen run without an error on the
other system.
➢ ???
➢ A pointer with value NULL is defined in the header files and
➢ stdlib.h stddef h
➢ ???
➢ We should not use such variable names that are starting with because in C++, there are lots of internal
constants and symbolic names that start with it
➢ Double underscore
➢ Identifier
➢ Logical
➢ Find out the logical error in following lines of code. If (x = 10) cout “x is 10”;
➢ 5
➢ . Reference, value
➢ When the break statement is encountered in a loop’s body, it transfers the control from the current
loop.
➢ Outside
➢ statement is used to terminate the processing of a particular case and exit from switch structure.
➢ Break
➢ If we pass more than one arguments to a function then they are separated by .
➢ Comma,
➢ What will be the value of the variable output in the given piece of code? double output = 0; output = (2 + 2) *
4 + 2 / (4 – 2);
➢ 17
➢ Heap
➢ Constructor
➢ 8bytes
➢ Heap, stack
➢ .
➢ 0
➢ Bejame stroustrup
➢ In shifting operations if zero is inserted at the left most bit, the negative number will become a number.
➢ Positive
➢ Constructors
➢ A class is -
➢ A member function
➢ Bugs can occur due to .
➢ Uninitiated data
➢ 8
➢ Stdlib.h, stddef.h
➢ ++
➢ The memory allocation functions return a chunk of memory whit a pointer of type .
➢ Void
➢ No return types
➢ Binary
➢ Dot
➢ Only one
➢ Relocatable, executable
➢ With the use of dynamic allocation of memory the system resources can be .
➢ Used efficiently
➢ The main advantage of function overloading is that ----------------------
➢ Dot .
➢ The memory allocation functions return a chunk of memory with a pointer type .
➢ Void
➢ ++
➢ No return type
➢ A class is
➢ Many
➢ When we include the header file in the angle brackets the compiler searches .
➢ Specific directory
➢ Identifiers
➢ Object
➢ Void
➢ A+ =1;
➢ With the use of dynamic allocation memory, the system resources can be
➢ Use efficiently
➢ It shifting operations if zero is inserted at the left mast bit , the negative number will become will become a
number
➢ Positive
➢ Main ()
➢ {
➢ #ifdefmax cout<<”hellow;
➢ }
➢ Error
➢ We should not use such variable name that are starting with
➢ because in c++ , there are lots of internal contents and symbolic names that start with it.
➢ Double underscore
➢ Header file provide so the program running on one operating system can run without an error on the
other system.
➢ Accessibility
➢ Uninitialized data
➢ At runtime
➢ For converting a void type pointer ptr into integer type, the correct syntax is;
➢ Int*ptr
➢ Two
➢ A class includes both data members as well as functions to manipulate that data.
➢ Bejame Stroustrup
➢ Exclusive OR
➢ For console input and output we use
➢ Header files provide so the program running on one operating system can run without an error on the
other system.
➢ Accessibility
➢ The function calloc takes two arguments, first argument is te and the second argument is the
➢ cout<<1;
➢ Two
➢ The memory allocation functions return a chunk of memory with a pointer of type
➢ Void
➢ Void
➢ Uninitialized data
➢ Which of the following code segment represents left shift shifts operate?
➢ The name of the destructor us the same as that of a class proceeding with a
➢ ~ sign
➢ Constructors
➢ stdlib.h,stddef.h
➢ Binary
➢ Special name which is subsituted in code by its definition and as a result we get an expanded code is called
➢ Macro
➢ For converting a void type pointer into integer type, the correct syntaxc is;
➢ int * ptr