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