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

Free Online Test

Taiyari24Hour

What is the output of given program if user enter value 99?

#include
void main()
{
int i;
printf("Enter a number:");
scanf("%d", &i); // 99 is given as input.
if(i%5 == 0)
{
printf("nNumber entered is divisible by 5");
}
}



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 == 1)
if (x >= 0)
printf("true\n");
else
printf("false\n");
}

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

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

3) 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("inside if\n");
else
printf("inside else if\n");
else
printf("inside else\n");
}

4) What is the output of given program if user enter value 99?

#include
void main()
{
int i;
printf("Enter a number:");
scanf("%d", &i); // 99 is given as input.
if(i%5 == 0)
{
printf("nNumber entered is divisible by 5");
}
}

5) A labeled statement consists of an identifier followed by a

UP Gk Online Test

taiyari24hour.com

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