edited by
1,079 views
2 votes
2 votes

Q. What is the output of following program?

int main(){
    register int Data =10;
    int *piSumData = NULL;
    piSumData = &Data;
    *piSumData = 5; 
    printf("%d",*piSumData);
}

1. Run time error
2. garbage value
3. 10
4. 5

edited by

Please log in or register to answer this question.

Related questions

1 votes
1 votes
2 answers
1
someshawasthi asked Nov 30, 2022
749 views
find the output of following programmain(){ extern int a; a=5; printf("%d",a);}
1 votes
1 votes
2 answers
2
radha gogia asked Aug 9, 2015
1,940 views
If I write #include<stdio.h int a; main() { //code }then since a is a global variable so what is the storage class of it , is it extern ?
1 votes
1 votes
1 answer
4
Sparsh-NJ asked Jul 15, 2023
384 views
Can an array store elements of different storage classes?