InstructionsTotal Questions: 20Total Minutes: 20This ExamTray Free Online Exam or MCQ Quiz tests your C Programming Skills on C Console IO, Formatted Output and Format Specifiers. Examples are given as questions and answers. Easily Attend Competitive Exams and Job Interview Questions. Go through C Theory Notes on Console IO and Formatted IO before attempting this test. All the Best Challenge SCORE0 / 20Take This Exam 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20*Q Buttons 1) What is an Escape Sequence in C language.? A) An escape sequence is a combination of two characters starting with Back Slash always. B) An escape sequence is usually part of a string to tell compiler to produce New Lines, New tabs, Single or Double quotes etc C) An escape sequence is used to format the output to look in desired way. D) All the above 2) Choose a correct statement about C Escape Sequences. A) \n produces new line. B) \t produces one tab space (white spaces) C) \b produces one Backspace D) All the above 3) Choose a correct statement about C Escape Sequences. A) \r produces one Carriage Return. \r does not take you to the next line. It takes cursor to only the beginning of same line. B) \f produces form feed C) \a produces Alert Sound or Beep Sound from PC motherboard speaker D) All the above 4) Choose a correct statement about C Escape Sequences. A) \' outputs one Single Quote. Right Single Quote. B) \" outputs one Double Quote. C) \\ produces one Visible Back Slash \. D) All the above 5) What is a format specifier in C language.? A) A format Specifier tells compiler to treat a variable value is predefined way. B) Different format specifiers are used to print different type of data. C) Format specifiers are used to write data to files in a formatted way. D) All the above 6) Choose a valid C format specifier.? A) %d prints integer constants B) %u prints unsigned integer constants C) %ld prints signed long and %lu prints unsigned long constants D) All the above 7) Choose a correct statement about C format Specifiers. A) %c prints unsigned or signed character constants. B) %s prints string constants C) %l or %L prints long constants. D) All the above Ad 8) Choose a correct statement about format specifiers. A) %f prints float constants with 6 digits of precision B) %lf prints double constants C) %Lf prints long double constants D) All the above 9) What does C format specifier %W.D represent.? A) W represents total number of columns including precision digits. B) D represents number of precision digits out of W columns. C) Plus(+) before W.D is for Right Alignment. Minus(-) before W.D is for Left Alignment D) All the above 10) Choose a C Formatted Input Output function below. A) printf(), scanf() B) sprintf(), sscanf() C) fprintf(), fscanf() D) All the above 11) Choose a C unformatted input output function below. A) gets(), puts() B) getchar(), putchar() C) A & B D) None of the above 12) What is the output of C program.? int main() { int a=123; printf("*%06d*",a); return 0; } A) *123* B) *6123* C) *000123* D) *006123* 13) What is the output of C program.? int main() { int a=123456; printf("*%03d*",a); return 0; } A) *123* B) *6123* C) *123456* D) *012345* 14) What is the output of C program.? int main() { int a=6543; printf("*%5d,*%-5d*",a,a); return 0; } A) *56543,*56543* B) * 6543,*6543 * C) *6543 ,* 6543* D) *6543,*6543* Ad 15) What is the output of C program.? int main() { float a=654.123456f; printf("%3.3f,%3.2f",a,a); return 0; } A) 654,654 B) 654.123456,654.123456 C) 654.123,654.12 D) 654.000,654.00 16) What is the output of C program.? int main() { char str[]="123"; printf("*%4s*%-4s*",str,str); return 0; } A) *4123*4123* B) * 123*123 * C) *123 * 123* D) *123*123* 17) Choose a correct statement about sprintf and sscanf functions.? char str[20]; A) sprintf(str,"formatstring",variables) prints output to console. sscanf(str,"formatstring",&variables) scans keyboard input and copies to str. B) sprintf(str,"formatstring",variables) prints output to string str. sscanf(str,"formatstring",&variables) scans keyboard input and prints to console C) sprintf(str,"formatstring",variables) prints output to string str. sscanf(str,"formatstring",&variables) scans input from str itself and assigns data to &variables. D) None of the above 18) What is the output of C program.? int main() { char ch='A'; ch=getchar(); putchar(ch); return 0; }//input= S A) A B) B C) S D) Compiler error 19) Choose a correct C statement.? A) SCANF can accept all types of data from keyboard including numbers and strings B) GETS can accept only one String of any length and any number of words. GETCHAR can accept only one character constant from keyboard. C) SCANF can accept only single word Strings D) All the above 20) What is the output of c program with %* operator.? int main() { char kh; scanf("%*c %c",&kh); putchar(kh); return 0; }//input=G H A) G B) H C) A D) Compiler error FINISH EXAM 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20*PREVStructures and Pointers - Online Test 2 NEXTC PreProcessor Directives - Online Test 1 Certification Group ID 3864