You are not logged in.

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

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
Website

Compiler Time Error:

C Programming Quizzes C Language 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


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-09-12 06:09:37

Advertisement
Ads By Google

Re: Compiler Time Error:



Board footer