Determine output:#include <stdio.h>void main(){ char *p = NULL; char *q = 0; if(p) printf(" p "); else printf("nullp"); if(q) printf("q"); else printf(" nullq");} x nullq where x can be p or nullp depending on the value of NULL Depends on the compiler p q nullp nullq TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ static int i=5; if(--i){ main(); printf("%d ", i); }} 0 0 0 0 5 4 3 2 1 Infinite Loop None of These TRUE ANSWER : ? YOUR ANSWER : ?
What will be printed after execution of the following program code?main(){ printf("\\nab"); printf("\\bsi"); printf("\\rha"); } hai asiha haasi None of these absiha TRUE ANSWER : ? YOUR ANSWER : ?
Choose the correct output for the following program.#include<stdio.h>void main(){ int a=10, b=11, c=13, d; d = (a=c, b+=a, c=a+b+c); printf("%d %d %d %d", d, a, b, c);} 50, 13, 24, 50 13, 13, 24, 13 50, 13, 24, 13 50, 13, 11, 13 13, 10, 24, 50 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ static int var = 5; printf("%d ", var--); if(var) main();} 5 4 3 2 1 None of These Infinite Loop 5 5 5 5 5 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the following code's output if choice = 'R'?switch(choice){ case 'R' : printf("RED"); case 'W' : printf("WHITE"); case 'B' : printf("BLUE"); default : printf("ERROR");break;} RED WHITE BLUE RED ERROR ERROR RED RED WHITE BLUE ERROR TRUE ANSWER : ? YOUR ANSWER : ?
Find the output of the following program.#define INC(X) X++void main(){ int x=4; printf("%d", INC(x++));} Error 6 5 4 TRUE ANSWER : ? YOUR ANSWER : ?
What is the output of given program if user enter "xyz" ?#includevoid main(){float age, AgeInSeconds;int value;printf("Enter your age:");value=scanf("%f", &age);if(value==0){printf("\\nYour age is not valid");}AgeInSeconds = 365 * 24 * 60 * 60 * age;printf("\\n You have lived for %f seconds", AgeInSeconds);} Enter your age : xyz Your age is not valid Complier error Enter your age: xyz You have lived for 0 seconds Enter your age: xyz Your age is not valid TRUE ANSWER : ? YOUR ANSWER : ?
Consider the following program fragment:for(c=1, sum=0; c <= 10; c++){ scanf("%d", &x); if( x < 0 ) continue; sum += x;}What would be the value of sum for the input 1, -1, 2, -2, 3, -3, 4, -4, 5, -5 1 15 10 -5 30 TRUE ANSWER : ? YOUR ANSWER : ?
Which operator from the following has the lowest priority? Assignment operator Conditional operator Division operator Comma operator Unary-operator TRUE ANSWER : ? YOUR ANSWER : ?