LMS handling service are
available
PAID
Assignment, QUIZ, GDBZ and
GRAND QUIZ GRAND QUIZ SERVICE are
available
0304-1659294 0304-1659294
JUNAID MALIK
AL-JUNAID INSTITUTE GROUP
CS201 GRAND QUIZ
1. ------- is used for input file or for reading from the file
Tellg()
2. Following is the declaration a ---- array int arr[2][2][2];
3-dimensional
3. !(x<3)mean in C++ that
X is greater than 3
4. Which of the following option is correct to complete the declaration of
the function ----(parameter1, parameter2) {
//code to be executed}
Void function name
5. Of stream is used for
Output file stream
6. By default the starting index of an array in C++ is---
0
7. How we declare an array of integer data whose size is 20 with array
name count
Int count[20];
8. Which of the following is a reserve word for data types in C/C++
Int
9. C was developed with the help of--- language
BCPL and B
10. An object of--- class can be created for saving the current
position of any opened file befor reading from the file
Streampos
MUHAMMad junaid
1
AL-JUNAID INSTITUTE GROUP
11. C++is a --- language
High level
12. In while loop the loop counter is initialized at---
Before entering the loop
13. What is the output of the following code if the 3rd case is ture
Switch(var)
{
Case “a”;
Cout<<”apple”<<endl;
}
Mango
14. --- character is used to indicate the end of the string
Null
15. Which one of the following is used to perform bit wise exclusive
or operation
|
16. If x=11, and x%=3, than values of x will be
2
17. A variable of character data type occupies --- bytes in memory
1
18. Null character is represented by --- C++
\0
19. In computer system there are mainly --- type of software
2
MUHAMMad junaid
2
AL-JUNAID INSTITUTE GROUP
20. There is a pointer variable named ptr of type float which type of
variable address can be stored by ptr
Float
21. A character is stored in the memory in---
Byte
22. X is a integer variable what does X++ means
Add 1 X value
23. When we call a function its control
Transfers to its definition
24. “\0” takes --- space in the memory
1 Byte
25. ---- will be used for enclosing function statement into a block
{}
26. How can we declare an array of characters whose size is 12 with
array name “country”
Char country[12];
27. Following is the declaration of 2D array how many column are
declared for this array int arr[3][2];
2
28. If we assign 2.06721 to an integer variable x, what will be the
output if we print x using cout<<statement
2
29. We can access a global variable---
From anywhere in the program
MUHAMMad junaid
3
AL-JUNAID INSTITUTE GROUP
30. We use --- to include all those functions in our program which
are located in different files
Linker
31. A character is stored in a memory in ---
Byte
32. Which is not true regarding structures
We can declare array of structure
33. Mr .Ahmad sleep thirty hours every day .this sentence is---
Grammatically correct but illogical
34. --- will explain the function of a program
Comments
35. Char**argv can be read as---
Pointer to pointer to char
36. What will be output of the following code
37. String name[4]={“ali”,”bilal”,”omer”,”ayeshan”};
Cout<,name[0];
Ali
1. !(x>3)means is in C++ that
X is less than 3
2. The data type before a function name represents its
Return type
3. The expression((a+b)==10))||((x+y)==20)is true only if
Either ((a+b)==10) OR ((x+y)==20)is true
MUHAMMad junaid
4
AL-JUNAID INSTITUTE GROUP
4. We have opened a file stream my file for reading (getting) myfile
tellg() given us the current get position of file pointer it returns
a whole number of type---
Long
5. = operator is used for---
Assigning values to variables
6. What is the use of is::trunk mode
To truncate an existing file to zero
7. Structures use---- allocation
Heap
8. Void myclass()
{ cout<<”I am student of BCSC.\n;}
Void my class2()
{ cout<<”I am student of BSIT.\n”;}
Int main()
{ my class2();
My clas();}
I am student of BSIT
I am student of BSCS
9. What will be the size of the following character array
Char name[]=”Adeel”;
6
10. A--- is an array of characters that can store number of
character specified
MUHAMMad junaid
5
AL-JUNAID INSTITUTE GROUP
String
11. ---- statement is used to terminate the processing of a
particular case and exit from switch structure
Break
12. If y=20 and z=y++ then the value of z will be----
21
13. If
Int a=17;
Int b=3;
Double c=a/b;
What will be value of variable c
5
14. What will be the output of the following code
String grade[3]={“A”,”B”,”C”};
Grade[2]=”F”;
Cout<<grade[2];
F
15. Declaration of two dimensional array of integer having 3
rows and 5 column is following
In arr [3][5];
16. A=a+1; can be written as---
A+=1;
17. A record is a group of related
Fields
MUHAMMad junaid
6
AL-JUNAID INSTITUTE GROUP
18. What will be the result of arithmetic expression 6+48/4*3
42
19. ---- construct is used to execute a set of instruction when a
condition is true and other set when it is false
If/else
20. If an array has 50 element what is allowable range of
subscripts
0-49
21. If int a=50; then the value of a=3; will be
16
22. Which of the following option is/are correct about array?
Only one type of element can store in an array
23. Whenever some number is added in an array name it will
jump as many---
Rows
24. ------ returns true if c is a digit or a letter and false
otherwise
Int isalnum(int c)
25. Which of the following is the default mode of the opening
using the of stream class
Ios::trunk
26. In which language the compiler of c language is written
C
27. While loop executes at least
MUHAMMad junaid
7
AL-JUNAID INSTITUTE GROUP
One time
28. String are accessed by variable of type
Char
29. Which of the following is the correct operator to compare
the values of two variables
==
30. Not operator is a ---
Single input operator
31. Pointer point to a particular
Memory address
32. A function is a block of statement that can be defined once
and used----
As many times as user wants
33. ---- function is used to find the number of characters in a
string
Strlen()
34. != operator is used to check whether the operand on the
left-hand side is----
Not equal
35. A while loop many execute ---- or more times
0
36. How we declare an array of integer data whose size is 20
with array name count
MUHAMMad junaid
8
AL-JUNAID INSTITUTE GROUP
Int count[20];
37. A variable declared within a code block become -----
variable for that block
Local
38. If a file is opened with ios::out mode, then----
We can write in this file
39. A function prototype is written ---- the function call
Before
40. ---- loop is mostly used to perform repetition of a tasks for
a known number of time
For
41. In shifting operations if zero is inserted at the left most bit
the negative number will become a----
Positive
42. It is the job of --- to transfer the executable code from
hard disk to main memory
Loader
43. RAID stands for
Redundant array of inexperience device
44. Array indexes start from---
0
MUHAMMad junaid
9
AL-JUNAID INSTITUTE GROUP
45. In call by reference --- of a variable is passed to the called
function
Address
46. How many times the following do while loop will execute
Int k=10;
Do
{
Cout<<”stements”<<endl;}
6
47. The name of a location in memory is called---
Variable
48. Which statement is used to close a file
Myfile.close();
49. ------ allow us to have a memory location and use it as int
or char interchangeably
none of the given
50. while handling files one can have---- option
all of the given
51. which is the correct syntax to define a structure named
student
struct student{
//variable};
MUHAMMad junaid
10
AL-JUNAID INSTITUTE GROUP
52. <and> both are----- operators
Logical
53. Identify the logical error in the following if condition
If((i<5)&&(i>15))
Condition is always false
54. The use of* sign in first and second statements is called
Int*ptr=&x;
Cout<<*ptr;
Referencing dereferencing
55. C is widely known as development language of operating
system
Linux
56. If x is declare as an integer what will be result of the given
expression
4
57. What will be the correct syntax of declaration of the
following statement
Const int*ptr
58. = operator is used for-----
Assigning values to variable
59. After evaluating the expression X=10+3*4/2-1 the value of
x will be
15
60. We can read write and manipulate the same file using
Fstream.h
61. Return type of a function that does not return any values
must be----
Void
MUHAMMad junaid
11
AL-JUNAID INSTITUTE GROUP
62. Pointer store the---
Memory address
63. ----- operator uses the sign^
Exclusive OR
64. To get the values stored at a memory address we use
the---
Dereferencing operator
65. C++ is a---- language
High level
66. Telling a computer what to do is called
Programming
67. Null character is represented by --- c++
\0
68. A character is stored in the memory in----
Byte
69. Complier translates high level language program into ----
language code
Machine
70. Each array declaration must provide the information about
all these things except---
The location of the first element to be stored
71. Eof is used to check for the---- of file when a file is being
read
MUHAMMad junaid
12
AL-JUNAID INSTITUTE GROUP
End
72. The result of 4%3 will be
1
73. When the logical operator AND(&&0 combine two
expression exp1 and exp2 then the result will be true only
When both exp1 and exp2 are true
74. Multi[3][3]element can also be accessed by
*(*(multi+3)+3
75. What is output of following code int
data[10]={10,20,30,40,50,60,70,80,90,100};int*xptr=&data[4],
Int*yptr=&data[6];
Cout<<xptr+yptr++;
120
76. Which of the following is not the subcategory of the
system software
None of the above
77. We get 12|8=--- where “|”is(bit wise OR)
12
78. ----is a substitute of multiple if statement
If--- elseif statement
79. Find out the logical error in following lines of code
If(x=10)
Cout<<”x is 10”;
Assignment operator should not be used for comparison
MUHAMMad junaid
13
AL-JUNAID INSTITUTE GROUP
80. Which is not true regarding structures
We can not declare pointers to structure
81. --- are used to compile the code
Compiler
82. A--- structure specifies that can action is to be repeated
while some condition remains true
Repetition
83. In which language the compiler of c language is written
C
84. Character strings are terminated by---
\0
85. A function is a block of statement that can be define once
and used --- in the program
As many times are user wants
86. --- is used for output during the process of writing to the
file
Seekp()
87. In case of two dimensional array if you add some number
in a two dimensional array name it will jump to the next—
Row
88. In while loop the condition is checked --- the execution of
loop
Before
MUHAMMad junaid
14
AL-JUNAID INSTITUTE GROUP
89. Which step is not not performed during a program design
Write details about the performance of program
90. We can say that a pointer is a variable that hodles the---
address
Memory
91. When accessing a structure member the identifier to the
left of the dot operator is the name of----
Structure variable
92. Suppose we have a file name myfile.txt what will be the
correct syntax of file opening for input
Myfile.open(myfile.txt”,ios::in);
93. Suppose we have int y[10];
To access the 4th element of the array we write---
Y[3];
94. Which operator has the highest precedence
(*,-,/,+)
*and/both have the same highest precedence
95. To read command line argument the main() function itself
must be given---
2
96. From the following which one is the range of random
number generator function rand()
0-32767
MUHAMMad junaid
15
AL-JUNAID INSTITUTE GROUP
97. ________variables are those that are defined are outside
of main
GLOBAL
98. When the compiler overload the assignment (=) operator
by Default then
Compiler does member wise assignment
MUHAMMad junaid
16