#include<stdio.h>
#include<conio.h>
void main()
{
int a=(1,2,3,(1,2,3,4);
switch(a)
{
printf("ans:");
case 1: printf("1");break;
case 2: printf("2");break;
case 3: printf("1");break;
case 4: printf("4");break;
printf("end");
}
getch();
}


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Code Interview Questions

prog. to produce 1 2 3 4 5 6 7 8 9 10

4 Answers   TCS,


Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped

1 Answers   IBM,


Finding a number which was log of base 2

1 Answers   NetApp,


Write a program that reads a dynamic array of 40 integers and displays only even integers

2 Answers  


main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }

2 Answers   Adobe, CSC,






programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h

1 Answers  


void main() { int i=i++,j=j++,k=k++; printf(ā€œ%d%d%dā€,i,j,k); }

1 Answers  


main() { int i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p printf("%f", i/(*p) ); // i is divided by pointer p } a. Runtime error. b. 1.00000 c. Compile error d. 0.00000

3 Answers   HCL,


how can i cast a char type array to an int type array

2 Answers  


What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }

1 Answers  


main() { printf("%x",-1<<4); }

3 Answers   HCL, Sokrati, Zoho,


source code for delete data in array for c

1 Answers   TCS,


Categories