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