Saturday, 13 December 2014

Programming Quiz-20

Q: What will be the output of following program?
#include<stdio.h>
int main( )
{
        float a=5,b=2;
        int c,d;
        c=a%b;
        d=a/2;
        printf("%d",d);
        return 0;
}

Options:

A: 3
B: 2.5
C: 2
D: Error

Answer: D

No comments:

Post a Comment