C Programming and Technical Category

void fun()
{
// what should be the logic here to print x=20 instead of x=10 in the main function?
}
void main()
{
int x=20;
fun();
x=10;
printf("%d",x);
getch();
}

Read Solution (Total 4)

C Other Question

void main(){
int a=1;
void xyz(int , int);
xyz(++a,a++);
xyz(a++,++a);
printf("%d",a);
}
void xyz(int x, inty){
printf("%d%d",x,y);
}
Find the Output.
int main(){
char a=250;
int expr;
expr= a+ !a + ~a + ++a;
printf("%d",expr);
return 0;
}
Options:249,250,0,-6