Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int i = 3;
    int l = i / -2;
    int k = i % -2;
    printf("%d %d\n", l, k);
    return 0;
}

A. Compile time error

B. -1 1

C. 1 -1

D. Implementation defined

Answer: Option B


This Question Belongs to C Program >> C Fundamentals

Join The Discussion

Related Questions on C Fundamentals