You are not logged in.

#1 2015-09-15 04:16:37

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
Website

C Language Control Structures Quiz Question.

C Programming Quizzes C Language Control Structures

Directions:
What will be the output of the given program?

Question:
#include<stdio.h>
void main()
{
    int value1, value2=100, num=100;
    if(value1=value2%5) num=5;
    printf("%d %d %d", num, value1, value2);
}

Option A):
100 100 100
Option B):
5 0 20
Option C):
100 0 100
Option D):
100 5 100

Correct Answer is Option C):
100 0 100


Failure is the first step towards seccess.

2015-09-15 04:16:37

Advertisement
Ads By Google

Re: C Language Control Structures Quiz Question.



Board footer