Programming Concepts and Logics | Check Your Level | MCQ April 3, 2025April 17, 2024 by jaminrai Programming Concepts & Logics This MCQ helps to check levels of:your understanding on programming languagesunderadatnd about compiler, interpreter and Assemblerdifferent High level languagesdifferent types of errors in programmingcontrol structureProgram design toolstypes of dataI/O function, operator and many more 1 / 76 Which of the following is not a type of branching statement? Do while If else If else if Switch case 2 / 76 What will be the value of y if x=8? Y=(x>6?4:6) 0 compiler error 4 6 3 / 76 Which function is used to copy string? strcp strcopy strcpy strcat 4 / 76 Array elements are always store in ________ memory location Random Sequential and Random Sequential Non of these 5 / 76 Which among the following is an unconditional control structure? goto if-else do-while for 6 / 76 Who is the father of C programming? Dennis Ritchie Von Neuman E.F. Codd James A. Gosling 7 / 76 Which of the following statement is not true? EBCD is 8 bits codes to represent 256 characters or symbols in IBM mainframe BCD code is represented in terms of 5 bits to represent a single decimal digit. Unicode is 16 bits codes to represent 65536 different characters, numbers, symbols,, etc. ACSII is 8 bit codes to represents 256 characters or symbols 8 / 76 What is the maximum length of a C string? 256 characters 64 characters None of these options are correct 32 characters 9 / 76 Which pair of functions below are used for single character I/O getchar() and putchar() none of these input() and output() scanf() and printf() 10 / 76 A C string element is always stored in? None of these options Random access location Alternate memory location Sequential memory location 11 / 76 Which of the following is not basic data types in C language? int string char float 12 / 76 Which of the following is not a type of control structure? Sequence Selection Condition Looping 13 / 76 Which type of constant is defined by using #define? integer constant symbolic character escape sequence 14 / 76 Which of the following statement is correct? strcmp(s1,s2) returns a number less than 0 if s1>s2 strcmp(s1,s2) returns 0 if s1= =s2 strcmp(s1,s2) returns 1 if s1= =s2 strcmp(s1,s2) returns a number greater than 0 if s1<s2 15 / 76 A labeled statement consist of an identifier followed by = ; , : 16 / 76 Among unary operation which operator represents increment? ! -- = ++ 17 / 76 Which of the following is interpreted language? C Language BASIC C++ Language Visual Basic 18 / 76 Int len=strlen("Jamin Rai"); printf(%d",len);What would be the value of len printed? 10 9 8 Depends on compiler 19 / 76 Which of the following character is used to terminate an instruction in C Program? Colon Semicolon Period Comma 20 / 76 Which operator is used to find remainder of two integers? % MOD ! 21 / 76 Which of the following statement is not true? #include helps to necessary headers files to the program #include and #define are commonly used preprocessors Library function are defined outside header files Preprocessor directive is a special type of program that helps to execute codes before passes through compiler. 22 / 76 The operator & is used for Logical OR Bitwise OR Logical AND Bitwise AND 23 / 76 How much memory should require holding long integer data in Computer? 4 8 1 2 24 / 76 Which component is not required in a simple if else statement? condition true statement counter statement false statement 25 / 76 A string in C is 2-D Array of Character 1-D Array of character Both 1-D and 2-D array of character None of these 26 / 76 This C function copies the contents of the source string at the end of the target string? none of the options strcat() copycat() both Strcat() & copycat() 27 / 76 Which loop executes at least once while do while if For 28 / 76 Which type of type specifier is used to hold integer type data? %e %d %f %c 29 / 76 Which escape character can be used to begin a new line in c? m n b a 30 / 76 The continue statement cannot be used with ____ Do while Switch While For 31 / 76 Which header file is essential for using strcmp() finction? string.h strcmp.h text.h strings.h 32 / 76 Which of the following operator reverse the result of expression its operators on? ! All of the options are correct || && 33 / 76 Which of the following language is not a type of third generation language? C Lanugage FORTAN BASIC Java 34 / 76 The operator && is an example of ____ operator. Increment Rational Assignment Logical 35 / 76 C is _____ Language? High Level Machine Level Low Level Middle Level 36 / 76 ++ Operator used within loops increment the value of variable by 10 Depends on compiler 1 2 37 / 76 Which keyword can be used for coming out of recursion? Break Exit Both Return and Break Return 38 / 76 What is the use of sqrt() library function? To find square root of a circle. To find square root of given number. To find square of given number To find roots of equations 39 / 76 C Language developed at _____? AT & T's Bell Laboratories of French in 1972 AT & T's Bell Laboratories of USA in 1972 Sun Microsystem in 1973 Cambridge University in 1972 40 / 76 Which of the following symbol is used to denote a pre-processor statement? ~ # ; ! 41 / 76 Null character is represented by 2 n O 42 / 76 C program are converted into machine language with the help of Interpreter A compiler An operating system An Editor 43 / 76 Which statement is not true? The size of an array is static. The data items of array are stored in contiguous memory locations. An array is collection of similar type of data items. An array is collection of dissimilar type of data items. 44 / 76 Which is the right way to declare constant in C? int const var=10; All of these int const var = 10; const int var = 10; 45 / 76 Number of keywords present in C languages is? 32 34 62 64 46 / 76 Which one is output function? printf getchar scanf gets 47 / 76 Which of the following statement is not true?? A syntax error is easy to find than logical error. A logical error is easily detected by compiler. A run time errors occur during the running time of the software Meaningless instructions make the logical errors 48 / 76 What is program? A finite set of instruction to computer to perform specific task A finite set of subprograms to computer to perform specific task A finite set of functions to computer to perform specific task All of the options are correct 49 / 76 The ____ statement is used in the loops to skip a part of the loop and continue the next cycle of the loop. If Continue Switch Break 50 / 76 Which of the following format specifier is used for string data type? f s d g 51 / 76 Which of the following symbol is not a valid keyword break auto short else if 52 / 76 Which of the following is not true? Algorithm is a finite sequence of instructions for solving a problem Pseudo code is expressed in terms of English like structure and mathematical expression. A flowchart can solve complex real-world problem Flowchart is a pictorial form of algorithm that describes the procedure to solve a problem 53 / 76 Which of the following symbol is not a valid character set? > < # @ 54 / 76 Which of the following statement is not true? C is internationally standardized programming language C is powerful and portable programming language C is a general purpose low level programming language C is structural programming language. 55 / 76 What c function copies the contents of one string to another? strcmp() None strrev() strcpy() 56 / 76 Which of the following symbol is valid identifier? 1.x x.1 1_x X_1 57 / 76 What is the work of break keyword? Restart execution of program Exit form loop or switch statement None of these Halt execution of program 58 / 76 Which of the following is not an arithmetic operator? * + % & 59 / 76 Which one is input function? scanf puts printf putchar 60 / 76 A string constant in C is terminated by " "" '