main()
{
char c;
int i = 456;
clrscr();
c = i;
printf("%d", c);
}
a. 456
b. -456
c. random number
d. none of the above
Answers were Sorted based on User's Feedback
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }
main() { 41printf("%p",main); }8
void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }
how to concatenate the two strings
write a program in c to merge two array
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
main() { int i=5,j=6,z; printf("%d",i+++j); }
What are the following notations of defining functions known as? i. int abc(int a,float b) { /* some code */ } ii. int abc(a,b) int a; float b; { /* some code*/ }
char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)
int aaa() {printf(“Hi”);} int bbb(){printf(“hello”);} iny ccc(){printf(“bye”);} main() { int ( * ptr[3]) (); ptr[0] = aaa; ptr[1] = bbb; ptr[2] =ccc; ptr[2](); }