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