What will be the value of sum after the following program is executed?void main(){ int sum=1, index = 9; do{ index = index – 1; sum *= 2; }while( index > 9 );} 0.5 1 2 9 0.25 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the given program?#include<stdio.h>void main(){int a=11,b=5;if(a=5) b++;printf("%d %d", ++a, b++);} 11 6 6 6 6 7 5 6 12 7 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i; printf("%d", scanf("%d", &i)); // value 10 is given as input here} Garbage Value 10 None of These 1 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ char *p; p="Hello"; printf("%c", *&*p);} Some Address will be printed None of These H Hello TRUE ANSWER : ? YOUR ANSWER : ?
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");} nullp nullq x nullq where x can be p or nullp depending on the value of NULL p q Depends on the compiler TRUE ANSWER : ? YOUR ANSWER : ?
What will happen after compiling and running following code?main(){ printf("%p", main); } Will make an infinite loop. Error None of these. Some address will be printed. TRUE ANSWER : ? YOUR ANSWER : ?
The declarationint (*p) [5];means None of these. The same as int *p[ p is a pointer to a 5 elements integer array. p is one dimensional array of size 5, of pointers to integers. TRUE ANSWER : ? YOUR ANSWER : ?
What is the correct value to return to the operating system upon the successful completion of a program? 2 -1 Program do no return a value. 1 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the program ?#include<stdio.h>int main(){ int arr[1] = {10}; printf("%d", 0[arr]); return 0;} None of these 10 0 1 6 TRUE ANSWER : ? YOUR ANSWER : ?