const int perplexed = 2;
#define perplexed 3
main()
{
#ifdef perplexed
#undef perplexed
#define perplexed 4
#endif
printf("%d",perplexed);
}
a. 0
b. 2
c. 4
d. none of the above
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.
WAP to display 1,2,3,4,5........N
main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a[4]='d'; abc(a); } abc(char a[]){ a++; printf("%c",*a); a++; printf("%c",*a); }
int a=1; printf("%d %d %d",a++,a++,a); need o/p in 'c' and what explanation too
main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }
what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }
int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }
All the combinations of prime numbers whose sum gives 32
main() { int x=5; clrscr(); for(;x<= 0;x--) { printf("x=%d ", x--); } } a. 5, 3, 1 b. 5, 2, 1, c. 5, 3, 1, -1, 3 d. –3, -1, 1, 3, 5
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.
void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }