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

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) How many times will the following loop be executed?

 ch ='b';
while(ch>='a' && ch<='z')
ch++;

4) Consider the following code fragment:

 for(digit=0; digit<9; digit++)
{
digit = 2*digit;
digit--;
}
How many times the loop will be executed?

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

UP Gk Online Test

taiyari24hour.com

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