C Programming and Technical Programming Output

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

Read Solution (Total 2)

C Other Question

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();
}
A 10-bit unsigned integer has the following range:
Options:
[1] 0 to 1000
[2] 0 to 1024
[3] 1 to 1025
[4] 0 to 1023