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

Free Online Test

Taiyari24Hour

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);
}



View More Related Question

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

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

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

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

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

 #include <stdio.h>
void main()
{
int x = 5;
if (x < 1);
printf("Hello");
}

4) 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);
}

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

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.