I Got puzzled..


Get puzzled in c:

1. Evaluate expression (7/9*9).
2. float x=sqrt(36.0);
printf(“Value x=%d”,x);
3. for(;;);
4.  What is the error here.
void main(){
main:
printf(“Address=%p”,main-main);
}
5. What is the o/p:
void main(){
main:
printf(“Address=%p”,main);
}
6. what is o/p.
void main(){
int a=20,foo(int);
printf(“FOO= %d”,foo(a));
}
int foo(int x){
int p=20,q=30;
(a>10)? return p: return q;
}

Answers I tested:
1. 0.000000
2. 6.000000
3. goes into infinite loop
4. Error:Size of type is unknown or zero.
5. Address: 0291
6. Error: Expression Syntax

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s