VU Grand Quiz

CS201 Solved Grand Quiz Spring 2021

Welcome to CS201 Grand Quizzes at Virtual University Exam Guide (VUExamGuide.com) – your ultimate destination for 100% Correct Answers! If you are a CS201 student at Virtual University (VU), looking for a reliable study resource to excel in your quizzes and exams, you’ve come to the right place.

Our CS201 Grand Quizzes cover a comprehensive range of topics, meticulously prepared by our expert team to ensure accuracy and depth of understanding. With a focus on the fundamentals of programming concepts and problem-solving techniques, these quizzes will sharpen your coding skills and enhance your proficiency in programming.

No more struggling with complex coding challenges or uncertain solutions! VUExamGuide.com empowers you to excel in CS201. Embrace the knowledge and skills you need to write efficient code, develop algorithms, and tackle real-world programming tasks.

Join us now and embark on a journey of academic excellence with CS201 Grand Quizzes. Prepare to shine and propel yourself towards a brighter future – start exploring VUExamGuide.com today!

CS201 Solved MCQs

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

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

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

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

String name[4]={“ali”,”bilal”,”omer”,”ayeshan”};

Cout<,name[0];

                Ali

39.          !(x>3)means is in C++ that

                X is less than 3

40.          The data type before a function name represents its

                Return type

40.          The expression((a+b)==10))||((x+y)==20)is true only if

                Either ((a+b)==10) OR ((x+y)==20)is true

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

42.          = operator is used for—

                Assigning values to variables

43.          What is the use of is::trunk mode

                To truncate an existing file to zero

44.          Structures use—- allocation

                Heap

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

46.          What will be the size of the following character array

Char name[]=”Adeel”;

                6

47.          A— is an array of characters that can store number of character specified

                String

48.          —- statement is used to terminate the processing of a particular case and exit from switch structure

                Break

49.          If y=20 and z=y++ then the value of z will be—-

                21

50.          If

Int a=17;

Int b=3;

Double c=a/b;

What will be value of variable c

                5

51.          What will be the output of the following code

String grade[3]={“A”,”B”,”C”};

Grade[2]=”F”;

Cout<<grade[2];

                F

52.          Declaration of two dimensional array of integer having 3 rows and 5 column is following

                In arr [3][5];

53.          A=a+1; can be written as—

                A+=1;

54.          A record is a group of related

                Fields

55.          What will be the result of arithmetic expression 6+48/4*3

                42

56.          —- construct is used to execute a set of instruction when a condition is true and other set when it is false

                If/else

57.          If an array has 50 element what is allowable range of subscripts

                0-49

58.          If int a=50; then the value of a=3; will be

                16

59.          Which of the following option is/are correct about array?

                Only one type of element can store in an array

60.          Whenever some number is added in an array name it will jump as many—

                Rows

61.          —— returns true if c is a digit or a letter and false otherwise

                Int isalnum(int c)

62.          Which of the following is the default mode of the opening using the of stream class

                Ios::trunk

63.          In which language the compiler of c language is written

                C

64.          While loop executes at least

                One time

65.          String are accessed by variable of type

                Char

66.          Which of the following is the correct operator to compare the values of two variables

                ==

67.          Not operator is a —

                Single input operator

68.          Pointer point to a particular

                Memory address

69.          A function is a block of statement that can be defined once and used—-

                As many times as user wants

70.          —- function is used to find the number of characters in a string

                Strlen()

71.          != operator is used to check whether the operand on the left-hand side is—-

                Not equal

72.          A while loop many execute —- or more times

                0

73.          How we declare an array of integer data whose size is 20 with array name count

                Int count[20];

74.          A variable declared within a code block become —– variable for that block

                Local

75.          If a file is opened with ios::out mode, then—-

                We can write in this file

76.          A function prototype is written —- the function call

                Before

77.          —- loop is mostly used to perform repetition of a tasks for a known number of time

                For

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

                Positive

79.          It is the job of — to transfer the executable code from hard disk to main memory

                Loader

80.          RAID stands for

                Redundant array of inexperience device

81.          Array indexes start from—

                0

82.          In call by reference — of a variable is passed to the called function

                Address

83.          How many times the following do while loop will execute

Int k=10;

Do

{

Cout<<”stements”<<endl;}

                6

84.          The name of a location in memory is called—

                Variable

85.          Which statement is used to close a file

                Myfile.close();

86.          —— allow us to have a memory location and use it as int or char interchangeably

                none of the given

87.          while handling files one can have—- option

                all of the given

88.          which is the correct syntax to define a structure named student

                struct student{//variable};

89.          <and> both are—– operators

                Logical

90.          Identify the logical error in the following if condition

If((i<5)&&(i>15))

                Condition is always false

91.          The use of* sign in first and second statements is called

Int*ptr=&x;

Cout<<*ptr;

                Referencing dereferencing

92.          C is widely known as development language of operating system

                Linux

93.          If x is declare as an integer what will be result of the given expression

                4

94.          What will be the correct syntax of declaration of the following statement

                Const int*ptr

95.          = operator is used for—–

                Assigning values to variable

96.          After evaluating the expression X=10+3*4/2-1 the value of x will be

                15

97.          We can read write and manipulate the same file using

                Fstream.h

98.          Return type of a function that does not return any values must be—-

                Void

99.          Pointer store the—

                Memory address

100.        —– operator uses the sign^

                Exclusive OR

101.        To get the values stored at a memory address we use the—

                Dereferencing operator

102.        C++ is a—- language

                High level

103.        Telling a computer what to do is called

                Programming

104.        Null character is represented by — c++

                \0

105.        A character is stored in the memory in—-

                Byte

106.        Complier translates high level language program into —- language code

                Machine

107.        Each array declaration must provide the information about all these things except—

                The location of the first element to be stored

108.        Eof is used to check for the—- of file when a file is being read

                End

109.        The result of 4%3 will be

                1

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

111.        Multi[3][3]element can also be accessed by

                *(*(multi+3)+3

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

113.        Which of the following is not the subcategory of the system software

                None of the above

114.        We get 12|8=— where “|”is(bit wise OR)

                12

115.        —-is a substitute of multiple if statement

                If— elseif statement

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

117.        Which is not true regarding structures

                We can not declare pointers to structure

118.        — are used to compile the code

                Compiler

119.        A— structure specifies that can action is to be repeated while some condition remains true

                Repetition

120.        In which language the compiler of c language is written

                C

121.        Character strings are terminated by—

                \0

122.        A function is a block of statement that can be define once and used — in the program

                As many times are user wants

123.        — is used for output during the process of writing to the file

                Seekp()

124.        In case of two dimensional array if you add some number in a two dimensional array name it will jump to the next—

                Row

125.        In while loop the condition is checked — the execution of loop

                Before

126.        Which step is not not performed during a program design

                Write details about the performance of program

127.        We can say that a pointer is a variable that hodles the— address

                Memory

128.        When accessing a structure member the identifier to the left of the dot operator is the name of—-

                Structure variable

129.        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);

130.        Suppose we have int y[10];

To access the 4th element of the array we write—

                Y[3];

131.        Which operator has the highest precedence

(*,-,/,+)

                *and/both have the same highest precedence

132.        To read command line argument the main() function itself must be given—

                2

133.        From the following which one is the range of random number generator function rand()

                0-32767

134.        ________variables are those that are defined are outside of main

                GLOBAL

135.        When the compiler overload the assignment (=) operator by Default then

                Compiler does member wise assignment

Leave a Reply

Your email address will not be published. Required fields are marked *