Determine Output:#include<stdio.h>void main(){ char s[]={'a','b','c','n','c','\0'}; char *p, *str, *str1; p=&s[3]; str=p; str1=s; printf("%c", ++*p + ++*str1-32);} N None of These M P TRUE ANSWER : ? YOUR ANSWER : ?
What will be the final value of the digit?void main(){ int digit = 0; for( ; digit <= 9; ) digit++; digit *= 2; --digit;} 16 20 -1 19 17 TRUE ANSWER : ? YOUR ANSWER : ?
Consider the following program fragment, and choose the correct onevoid main(){ int a, b = 2, c; a = 2 * (b++); c = 2 * (++b);} a = 4, c = 8 a = 3, c = 8 a = 4, c = 6 b = 3, c = 6 b = 4, c = 6 TRUE ANSWER : ? YOUR ANSWER : ?
What is the right choice, if the following loop is implemented?void main(){ int num = 0; do{ --num; printf("%d", num); }while( ++num >= 0 );} The program will not enter into the loop. Prints the value of 0 one time only. A run time error will be generated. There will be a compilation error reported. The loop will run infinitely many times. TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following function is more appropriate for reading in a multi-word string? scanf() puts() printf() None of these gets() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the program ?#include#includevoid main(){ char str[] = "Exam\0Veda"; printf("%s", str);} Exam Exam Veda None of these Exam\0Veda Veda TRUE ANSWER : ? YOUR ANSWER : ?
If the two strings are identical, then strcmp() function returns -1 0 1 None of these true TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following code?void main(){ int a[10]; printf("%d %d", a[-1], a[12]);} Garbage value 0 Garbage vlaue Garbage Value 0 0 0 Garbage Value Code will not compile TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the program ?#include<stdio.h>void main(){ int a[5] = {5, 1, 15, 20, 25}; int i, j, m; i = ++a[1]; j = a[1]++; m = a[i++]; printf("%d, %d, %d", i, j, m);} 2, 3, 20 2, 1, 15 3, 2, 15 1, 2, 5 TRUE ANSWER : ? YOUR ANSWER : ?
What number would be shown on the screen after the following statements of C are executed?char ch; int i; ch = 'G'; i = ch-'A';printf("%d", i); 8 7 9 5 6 TRUE ANSWER : ? YOUR ANSWER : ?