CS201 Grand Quiz by JUNAID
CS201 Grand Quiz by JUNAID
available
PAID
Assignment, QUIZ, GDBZ and
GRAND QUIZ GRAND QUIZ SERVICE are
available
0304-1659294 0304-1659294
JUNAID MALIK
AL-JUNAID INSTITUTE GROUP
MUHAMMad junaid
1
AL-JUNAID INSTITUTE GROUP
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
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
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];
MUHAMMad junaid
9
AL-JUNAID INSTITUTE GROUP
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
MUHAMMad junaid
11
AL-JUNAID INSTITUTE GROUP
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”;
MUHAMMad junaid
13
AL-JUNAID INSTITUTE GROUP
MUHAMMad junaid
14
AL-JUNAID INSTITUTE GROUP
MUHAMMad junaid
15
AL-JUNAID INSTITUTE GROUP
MUHAMMad junaid
16