0% found this document useful (0 votes)
3 views

CS201 Final Term

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

CS201 Final Term

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

CS201 updated quiz 2021

Searching file for quiz 1


ORANGE MONKEY TEAM

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

2. A=a+1, can be written as

A+=1

3. The compiler generates automatically.

Constructors

4. The data members of the class are initialized

At runtime

• Explicitly write keyword private in the class definition


• Separate the interface and implementation
• The default constructor has no arguments
• Constructor has the same name as of class
• Initializing the data members in the definition of the class is a syntax error

5. for parameters is also done for inline functions.

Automatic type checking

6. An instance of a class is called .

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

9. is a special type of pointer we have to cast it before we use it.

Void

10. Multiplicative, additive and assignment operators are operators


Binary

11. The memory allocation functions return a chunk of memory with a pointer of type
.

Void

12. Default constructor takes .

No parameters

13. In a class we can have constructor(s).

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?

&

19. Which of the following code segment represent a bitwise OR operator?

20. Which of the following code segment represent a Bitwise Exclusive OR operator
^

21. Which of the following code segment represent a NOT operator

22. C++ was developed by .

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

25. Constructor is a special function, called whenever we .

Instantiate an object of a class

26. Constructor is itself a of C++ and .

Function, can be overloaded

27. What is the other name of a variable?

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 .

User defined Data type

30. Bugs can occur due to .

Uninitialized data

31. The heap memory structure .

Constantly changes in size


32. How many bits from a byte?

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

34. The main advantage of function overloading is that .

The program becomes more readable

35. Marco are categorized into type(S)

Two

36. When we include the header file in the angle brackets the compiler searches for it in
.

Specific directory

37. Class can be defined as

A class includes both data members as well as functions to manipulate that data

38. operator uses the sign ^

Exclusive OR

39. For console input and output we use .

conio.h header file

40. Header file provide so the program running on one operating system can run
without an error on the other system

Portability

41. Constructor has .

The same name as of class

42. The object code of our program is combined with the .

Object code of the library functions

43. The malloc functions takes argument(s)


Two

44. The function overloading requires .

The argument list to be different


45. Bugs can occur due to .

Uninitialized data

46. The name of the destructor is the same as that of a class proceeding with a .

~sign

47. The main advantage of function overloading is that .

The program becomes more reliable

48. Which function is used to delete the allocated memory space?


Free

49. Symbolic constant PI can be defined as

#define PI3, 14

50. Windows operating system may itself takes memory from .

Heap

51. All the preprocessors directive starts with .

52. Which one of the following is used to perform bit-wise OR operator

53. Constructor is itself a of C++ and .

Funtion, can be overloaded

54. RAID stands for .

Redundant array of inexpensive devices

55. Object code is machine code but it is not and .

Reloadable, executable
56. Constructor is a special type of function;

Which has no return type

57. #include <iostream>


#include<conio.h>
Using namespace std;
Void display (int=1, float=2,3, char=’@’);
Main()
{
Display();
Display(5);
Display(6,7,8);
Getch();
}
Void display( int first float second char third)
{cout<”intfirst=<<first cout <<second=<<second cout<<third=<<third}

First=1, second=2,3, third=@first=5, second=2,3, third =@ first=6, second=7,8 third=@


first=9, second=10,11 third=$

58. Default constructor generated by does for us

Compiler, no initialization

59. #define CIRCUMFERENCE(X)(2*PI*R) is a

Definition of a marco

60. Constructor is itself a of C++ and .

Function, can be overloaded

61. We cannot use pointer for storing and reading data from it

NULL

62. Which function is used to delete the allocated memory space?

Free()

63. The main advantage of function overloading is that .


The program becomes more readable

64. The data members of the class are initialized .

At runtime
65. An instance of a class is called .

Object

66. Malloc function returns to the from the available memory

Void pointer, starting of the chunk of memory allocated from the heap

67. The is the increment operator in c++

++
68. The constructor contains .

No return type

69. For accessing data members we use operator

Dot.

70. In a class we can have constructor

Only one
71. Object code is machine code but it is not and .

Reloadable, executable

72. Getche() is a function and defined in header file.

Built in function, conio.h

73. In C++ a variable can be declared anywhere in the program, this will increase .

Readability

74. The compiler use a name mangling technique to .

Generate a unique token that is assigned to each function


75. Destructor

Takes no arguments and Can be overloaded

76. The default visibility for the data members of the class is .

Private

77. Which of the following permits function overloading in C++

Both type and arguments

78. Once we have defined a symbolic constant value using #define, that value during
program execution.

Cannot be changed

79. Encapsulation means _ .

That the data of a class cannot be accessed from outside

80. The original value remains unchanged in

Call by value

81. Programmer should be very careful about the memory management because it can
.

cause problems of memory leakage and dangling pointers

The destructor is used to .


deallocate memory

2.The main advantage of macros is that and program runs faster


macros are more efficient

5. Constructor is special type of function :


which has no return type

6. Unix operating system was written in C language


C
7. When accessing a structure member, the identifier to the left of the dot operator is the
name of .
Structure variable

8. Constructor has .
the same name as of class

9. For console input and output we use .


conio headerfile

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.

upper case alphabets

82. All the preprocessors directive starts with .

83. NULL has been defined in header file.

stdlib.h

84. Which one is the correct example of a unary operator

&

85. In which statement there can be default statement(s)

86. To access the data members of structure _ is used

Dot operator

87. The statement cout << yptr will show the the yptr points to

Memory address

88. If an array has 50 elements. What is allowable range of subscript

0-49

89. A^=b can be written as .


A=a^b;

90. If j=10 and x=++j then the value of x will be .

11

91. The string in the array is terminated by a .

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];

Int*ptr= data [0]

94. For casting, we normally declare a pointer of type .


We are going to use

95. A=aIb; can be written as .

aI=b;

96. The exclusive OR operator returns 1 if .

One inputs is 1 and other is zero

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.

99. Shifting the binary numbers is similar to shifting the numbers

Decimal

100. operator uses the sign^


Exclusive OR

101. operator uses the sign &

Bitwise AND operator

102. operator uses the sign I


Bit-wise OR operator

103. operator uses the sign ~

Not operator

104. operator uses the sign <<

Left shift operator

105. operator uses the sign >>

Right shift 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 = a + 1; can be written as:

➢ a += 1;

➢ The compiler generates automatically

➢ Constractors

➢ The data members of the class are initialized .

➢ At runtime

➢ For parameters is also done for inline functions

➢ Automatic type checking

➢ An instance of class is called:

➢ 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

➢ is a special type of pointer we have to cast it before we use it.

➢ Void

➢ Multiplicative, Additive and assignment operators are operators.

➢ 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

➢ for parameters is also done for inline functions.

➢ Automatic type checking

➢ melloc function returns to the from the available memory

➢ ???

➢ Constructor is a special function, called whenever we ?

➢ Instantiate an object of a class

➢ 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

➢ Constructor is itself a of C++ and

➢ Function, can be overloaded

➢ What is the other name for a variable?

➢ Identifier

➢ < and > both are _ operators.

➢ Logical

➢ Find out the logical error in following lines of code. If (x = 10) cout “x is 10”;

➢ signment operator should not be used for Comparison

➢ What will be the result of the expression j = i++; if initially j = 0 and i = 5?

➢ 5

➢ Default mechanism of calling a function by passing it array is call by


➢ and in case of passing variable is call by

➢ . 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

➢ Window operating system may itself takes memory from .

➢ Heap

➢ Initializing the data member within the class .

➢ Not an error Constructer has .

➢ The same name as of class

➢ The complier generates .

➢ Constructor

➢ What is the storage space of double data type?

➢ 8bytes

➢ The dynamic allocation whereas static memory allocation uses

➢ Heap, stack

➢ Which one of is the correct example of a unary operator?

➢ .

➢ Array indexes start from .

➢ 0

➢ C++ was developed by .

➢ Bejame stroustrup

➢ In shifting operations if zero is inserted at the left most bit, the negative number will become a number.

➢ Positive

➢ The compiler generates automatically.

➢ Constructors

➢ A class is -

➢ A member function
➢ Bugs can occur due to .

➢ Uninitiated data

➢ The heap memory structure .

➢ Constantly change in size How many bits from a byte?

➢ 8

➢ The function calloc takes two arguments, first argument is the


➢ and the second argument is the .

➢ Required space in term of numbers, size of space

➢ The main advantage of function overloading is that .

➢ The program become more readable

➢ A pointer with value null is defined IN THE header files and .

➢ Stdlib.h, stddef.h

➢ The increment operator in c++

➢ ++

➢ The memory allocation functions return a chunk of memory whit a pointer of type .

➢ Void

➢ The constructor contains .

➢ No return types

➢ Multiplication, additive and assignment operators are operators.

➢ Binary

➢ For accessing data members we use _ operators

➢ Dot

➢ In a class we can have constructor(s).

➢ Only one

➢ Object code is machine code but it is not and .

➢ 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 ----------------------

➢ The fogram becomes more readable

➢ For accessing data members we use _ operator.

➢ Dot .

➢ Object code is machine code but it is not and . Reloadable, executable

➢ The memory allocation functions return a chunk of memory with a pointer type .

➢ Void

➢ The is the increment operator in c++.

➢ ++

➢ The constructor contains .

➢ No return type

➢ A class is

➢ A user defined data type

➢ In a class we can have constructor(s).

➢ Many

➢ When we include the header file in the angle brackets the compiler searches .

➢ Specific directory

➢ What is the other name of a variable?

➢ Identifiers

➢ An instance of a class is called

➢ Object

➢ is a special type of pointer we here to cast it before we use it.

➢ Void

➢ A=a+1 ; can be written as

➢ 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

➢ What will be the output of following c++ code? #include <isotream.h>


➢ #define max 100

➢ 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

➢ Bugs can occur due to

➢ Uninitialized data

➢ The data members of the class are initialzed

➢ At runtime

➢ For converting a void type pointer ptr into integer type, the correct syntax is;

➢ Int*ptr

➢ Macros are categorized into type(s)

➢ Two

➢ Class can be defined as

➢ A class includes both data members as well as functions to manipulate that data.

➢ C++ was developed by

➢ Bejame Stroustrup

➢ operator uses the sign ^ .

➢ Exclusive OR
➢ For console input and output we use

➢ stdiib.h header file

➢ 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

➢ Required space in terms of numbers, size of space Constructor has


➢ The same name of an class

➢ Which of the following code segment represents a left shift operator?

➢ cout<<1;

➢ The object code of our program is combined with the _

➢ object code of the library functions

➢ The malloc function takes arugment(s)

➢ Two

➢ The memory allocation functions return a chunk of memory with a pointer of type

➢ Void

➢ is a special type of pointer we have to cast it before we use it.

➢ Void

➢ The function overloading requires

➢ the argument list to be different

➢ Bugs can occur dcue to

➢ Uninitialized data

➢ Which of the following code segment represents left shift shifts operate?

➢ Result = number << 1;

➢ The name of the destructor us the same as that of a class proceeding with a

➢ ~ sign

➢ The Complier generates automatically.

➢ Constructors

➢ Constructor is itself a of C++ and


➢ Function, can be overloaded

➢ Constructor is a special function, called whenever we

➢ Instantiate an object of a class

➢ The heap memory structure

➢ Constantly changes in size

➢ A pointerwith value null is defined in the header files and

➢ stdlib.h,stddef.h

➢ for parameters is also done for inline functions.

➢ automatic type checking How many bits form a type.


➢ 8

➢ Manipulate, Additive and assingment operators are operators.

➢ 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

You might also like