Tuesday, February 18, 2014

Coding

What is the output of this C code?
  1.    #include <stdio.h>
  2.    main()
  3.    {
  4.        if (sizeof(int) > -1)
  5.            printf("True");
  6.        else
  7.            printf("False");
  8.    
a) True
b) False

Answer:b
Output:
$ cc pgm.c
$ a.out
False

No comments:

Post a Comment