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