What will be the output of the given program?#includevoid main(){float num=5.6;switch(num){case 5:printf("5");case 6:printf("6");default : printf("0");break;}printf("%d", num);} 6 5.600000 0 5.600000 Complier error 5 5.600000 TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following is the correct way of declaring a float pointer: *float ptr; float ptr; None of these float *ptr; TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i; char a[]="�"; if(printf("%sn", a)) printf("Ok here n"); else printf("Forget itn");} Forget it Error Ok here None of These TRUE ANSWER : ? YOUR ANSWER : ?
What will be output if you will compile and execute the following c code?#include<stdio.h>#define max 5void main(){ int i = 0; i = max++; printf("%d", i++);} 7 6 0 Compiler Error 5 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int a[] = {10,20,30,40,50}, j, *p; for(j=0; j<5; j++){ printf("%d" ,*a); a++; } p = a; for(j=0; j<5; j++){ printf("%d" ,*p); p++; }} 10 20 30 40 50 Garbage Value 10 20 30 40 50 10 20 30 40 50 Error None of These TRUE ANSWER : ? YOUR ANSWER : ?
char* myfunc(char *ptr){ ptr+=3; return(ptr);}void main(){ char *x, *y; x = "EXAMVEDA"; y = myfunc(x); printf("y=%s", y);}What will be printed when the sample code above is executed? y=AMVEDA y=VEDA y=MVEDA y=EXAMIANS y=EDA TRUE ANSWER : ? YOUR ANSWER : ?
What is the output of the following statements?int i = 0;printf("%d %d", i, i++); 1 0 0 1 None of these 0 0 1 1 TRUE ANSWER : ? YOUR ANSWER : ?
What is the output of given program if user enter "xyz" ?#includevoid main(){float age, AgeInSeconds;printf("Enter your age:");scanf("%f", &age);AgeInSeconds = 365 * 24 * 60 * 60 * age;printf("You have lived for %f seconds", AgeInSeconds);} Enter your age: xyz You have lived for 0.00000 seconds Run time error Enter your age: xyz "after that program will stop" Enter your age: xyz You have lived for 0 seconds TRUE ANSWER : ? YOUR ANSWER : ?
What will happen after compiling and running following code?main(){ printf("%p", main); } Error Will make an infinite loop. Some address will be printed. None of these. TRUE ANSWER : ? YOUR ANSWER : ?