Which of following is not a valid name for a C variable? Exam veda Both A and B Exam_veda Examians None of these TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ printf("%p", main);} Some address will be printed make an infinite loop Error None of These TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following statements are true after execution of the program.void main(){ int a[10], i, *p; a[0] = 1; a[1] = 2; p = a; (*p)++;} a[1] = 2 Compilation error a[0] = 2 a[0] = 3 a[1] = 3 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of given program?#include<stdio.h>void main(){int a=3;for(;a;printf("%d ", a--);} infinity loop 3 2 1 0 no output 3 2 1 TRUE ANSWER : ? YOUR ANSWER : ?
What is the correct value to return to the operating system upon the successful completion of a program? -1 Program do no return a value. 2 1 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ char *str1 = "abcd"; char str2[] = "abcd"; printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));} 2 4 4 2 4 5 5 5 5 2 5 5 TRUE ANSWER : ? YOUR ANSWER : ?
#include<stdio.h>void main(){ int *ptr, a=10; ptr = &a; *ptr += 1; printf("%d, %d", *ptr, a);} 10, 10 10, 11 11, 11 11, 10 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i=1, j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; }} GOOD None of These Compiler Error GOOD BAD TRUE ANSWER : ? YOUR ANSWER : ?
What is the result of compiling and running this code?main(){ char string[] = "Hello World"; display(string);}void display(char *string){ printf("%s", string);} None of these. will print garbage value Compilation Error will print Hello World TRUE ANSWER : ? YOUR ANSWER : ?