CS201 QUIZ 2022 May 25, 2022 by Dilawar CS201 QUIZ 2022 2005 Created on May 25, 2022 By Dilawar CS201 midterm mcqs preparation 2022 1 / 21 What is the output of the following statement? int i = 2.5; do { cout i * 2; } while (i > 3 && i < 10); 510 5 48 error 2 / 21 Searching is easier when an array is already sorted True False 3 / 21 If an array has 100 elements, what is allowable range of subscripts? 0 - 99 1 - 99 0 - 100 1 - 100 4 / 21 What will be the value of ‘a’ and ‘b’ after executing the following statements? a = 3; b = a++; 3, 4 4, 4 3, 3 4, 3 5 / 21 What will be the correct syntax to initialize all elements of two-dimensional array to value 0? int arr[2][3] = {0,0} ; int arr[2][3] = {{0},{0}} ; int arr[2][3] = {0},{0} ; int arr[2][3] = {0} ; 6 / 21 Which of the following function returns the size of a string variable? Also Read: My mth631 Current Paper Today strlength() stringlen() strlen() strLength() 7 / 21 Computer can understand only machine language code. True False 8 / 21 If the file is not properly closed in the program, the program ____________. Terminate normally Indicate Runtime error Indicate Compile time error Crashes 9 / 21 Which of the following header file include string conversion functions? string.h stdlib.h ctype.h sconvert.h 10 / 21 The function of cin is To display message To read data from keyboard To display output on the screen To send data to printer 11 / 21 In C/C++ language the header file which is used to perform useful task and manipulation of character data is cplext.h ctype.h stdio.h delay.h 12 / 21 Word processor is Operating system Application software Device driver Utility software 13 / 21 Also Read: Eng101-2 Jan Each pass through a loop is called a/an enumeration Iteration culmination pass through 14 / 21 What is the correct syntax to declare an array of size 10 of int data type? int [10] name ; int name[10] ; int [10] name ; int name[] ; 15 / 21 Which of the following operator is used to access the value of variable pointed to by a pointer? * operator -> operator && operator & operator 16 / 21 Analysis is the -------------- step in designing a program Last Middle Post Design First 17 / 21 Paying attention to detail in designing a program is _________ Time consuming Redundant Necessary Somewhat Good 18 / 21 statement in curly braces is, Not required Good programming Relevant Must 19 / 21 Also Read: vu DIPLOMA IN APPLIED PSYCHOLOGY All Material The while loop becomes infinite, When the condition is always false When the condition is less than zero When the condition is always true When the condition contains a logical operator 20 / 21 Which of the following function(s) is/are included in stdlib.h header file? double atof(const char *nptr) int atoi(const char *nptr) char *strcpy ( char *s1, const char *s2) 1 and 2 only 21 / 21 If we want to store a string “abc” in an array str then the size of this array must be at least, 2 3 4 5 Your score is The average score is 54% LinkedIn Facebook Twitter VKontakte 0% Restart quiz Related
Assalamualaikum
Sir,
A good work to make a webpage
helpfull