#include<stdio.h>void main(){ int *ptr, a=10; ptr = &a; *ptr += 1; printf("%d, %d", *ptr, a);} 10, 10 11, 11 11, 10 10, 11 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ char s[]="man"; int i; for(i=0; s[i]; i++) printf("%c%c%c%c ", s[i], *(s+i), *(i+s), i[s]);} Compiler Error mmmm nnnn aaaa None of These mmm nnn aaa TRUE ANSWER : ? YOUR ANSWER : ?
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 );} 2 1 0.5 9 0.25 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:#define prod(a,b) a*bvoid main(){ int x=3, y=4; printf("%d", prod(x+2, y-1));} 15 11 10 12 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the given program?#include<stdio.h>void main(){ int i=10; printf("i=%d", i); { int i=20; printf("i=%d", i); i++; printf("i=%d", i); } printf("i=%d", i);} 10 20 21 21 10 20 21 20 10 10 11 11 10 20 21 10 TRUE ANSWER : ? YOUR ANSWER : ?
What is the output of the following program?#include<stdio.h>int c[10] = {1,2,3,4,5,6,7,8,9,10}; main(){ int a, b=0; for(a=0;a<10;++a) if(c[a]%2 == 1) b+=c[a]; printf("%d", b);} 24 None of these 20 30 25 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output given program?#include<stdio.h>void main(){int i = -10;for(;i;printf("%d ", i++));} -10 to -1 -10 to infinite -10 to 0 Complier error TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following program?void main(){ int a, b, c, d; a = 3; b = 5; c = a, b; d = (a, b); printf("c=%d d=%d", c, d);} c=5 d=3 c=3 d=3 c=5 d=5 c=3 d=5 TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following is correct way to define the function fun() in the below program?#include<stdio.h>void main(){ int a[3][4]; fun(a);} void fun(int *p[3][4]){} void fun(int *p[][4]){} None of these void fun(int p[][4]){} void fun(int *p[4]){} TRUE ANSWER : ? YOUR ANSWER : ?
What is the output of given program if user enter value 99?#include<stdio.h>void main(){int i;printf("Enter a number:");scanf("%d", &i); // 99 is given as input.if(i%5 == 0){printf("nNumber entered is divisible by 5"); }} Run time error Enter a number:99 Enter a number:99 Number is divisible by 5 complier error TRUE ANSWER : ? YOUR ANSWER : ?