Programming Languages C Objective
Mar 07, 2013

What will be output if you will compile and execute the following c code?

#include<stdio.h>

int main(){

int a=5,b=10,c=15;

int *arr[]={&a,&b,&c};

printf("%d",*arr[1]);

return 0;

}

Choose the correct answer:
A) 5
B) 15
C) 25
D) Compiler error
Detailed Explanation

Array element cannot be address of auto variable. It can be address of static or extern variables

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback