What is the output of given program if user enter "xyz" ?
#include
		Home | Discussion Forum
	
    
    

What is the output of given program if user enter "xyz" ?

#include
void main()
{
float age, AgeInSeconds;
printf("Enter your age:");
scanf("%f", &age);
AgeInSeconds = 365 * 24 * 60 * 60 * age;
printf("You have lived for %f seconds", AgeInSeconds);
}

Free Online Test

View More Related Question

1) Study the following 'C' program:

 #include<stdio.h>
void main()
{
static a,b;
while(a> b++)
}
What will be the value of a and b on the execution of above program?

2) What will be the output of the following C code?

 #include <stdio.h>
int main()
{
int x = 0;
if (x == 1)
if (x >= 0)
printf("true\n");
else
printf("false\n");
}

3) Which of the following is an invalid if-else statement?

4) What will be the output of the following C code?

 #include <stdio.h>
int main()
{
int x = 0;
if (x == 0)
printf("true, ");
else if (x = 10)
printf("false, ");
printf("%d\n", x);
}

5) What will be the output of the following C code?

 #include <stdio.h>
int main()
{
int a = 1;
if (a--)
printf("True");
if (a++)
printf("False");
}

UP Gk Online Test

taiyari24hour.com