Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following C code?
#include < stdio.h >
double var = 8;
int main()
{
int var = 5;
printf(“%d”, var);
}

What will be the output of the following C code?
#include < stdio.h >
double var = 8;
int main()
{
int var = 5;
printf(“%d”, var);
}
a) 5
b) 8
c) Compile time error due to wrong format identifier for double
d) Compile time error due to redeclaration of variable with same name

Answer: a

Join The Discussion