You are not logged in.

#1 2015-09-12 06:09:39

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

Compiler Time Error:

http://interviewquestionsanswers.org/quiz/C-Programming http://interviewquestionsanswers.org/qu … ge-Pointer

Directions:
#include<stdio.h>
void main()
{
      int i = 10;
      void *p = &i;
      printf("%d\n", (int)*p);
}

Question:
What will be the output of the following program?

Option A):
Compiler time error
Option B):
Undefined behavior
Option C):
Segmentation fault/runtime crash
Option D):
10

Correct Answer is Option A):
Compiler time error


Failure is the first step towards seccess.

2015-09-12 06:09:39

Advertisement
Ads By Google

Re: Compiler Time Error:



Board footer