C Interview Report
- 0of 0 votes
Answersint main()
- Shobhit July 02, 2012 in United States
{
int val,x=3,y=2,z=1,q=4;
val=(x>y?(x<z?20:10&&y>x?50:100):(y<z?40:9||x>q?30:10));
printf("%d\n",val);
}
Explain the output .| Report Duplicate | Flag | PURGE
C - 0of 0 votes
Answersfile 1 : int a[80];
- Shobhit July 02, 2012 in United States
file 2 : extern int *a;
int main(){
a[12]=100;
printf("%d\n",a[12]); }
Both files are compiled together . It's showing runtime error .
Why not linker error ?| Report Duplicate | Flag | PURGE
C - 1of 1 vote
Answersint fun(char *a){
- Shobhit July 02, 2012 in United States
printf("%d\n",sizeof(a));
return 1; }
int main()
{
char a[20];
printf("%d\n",sizeof(fun(a)));
}
Explain the output.| Report Duplicate | Flag | PURGE
C
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.