• edited by
1,793 views
2 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

Please log in or register to answer this question.

Position:
Show:

Related questions

2 2 votes
1 1 answer
382
382 views
Shivansh_Kumar asked Sep 1
382 views
#include <stdio.h int main() { double x = 9.0; double result; result = sqrt(x); printf("%f\n", result); return 0; } A) It prints 3.000000 B) It prints 0.000000 C) Behavio...
1 1 vote
2 answers 2 answers
1.9k
1.9k views
someshawasthi asked Nov 30, 2022
1,901 views
find the output of following programmain(){ extern int a; a=5; printf("%d",a);}
1 1 vote
3 answers 3 answers
3.4k
3.4k views
radha gogia asked Aug 9, 2015
3,449 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 ?
0 0 votes
1 1 answer
514
514 views
codertoday asked Jan 14
514 views
Consider the below statements:S1: Life time of dynamically allocated memory in heap segment is entire program.S2: NULL pointer dereferencing error and dangling pointer bo...