C Programming - Pointers - Discussion
Discussion Forum : Pointers - Point Out Correct Statements (Q.No. 3)
3.
Which of the statements is correct about the program?
#include<stdio.h>
int main()
{
float a=3.14;
char *j;
j = (char*)&a;
printf("%d\n", *j);
return 0;
}
Discussion:
50 comments Page 5 of 5.
Bindu said:
10 years ago
Here this program produces garbage value.
Suresh said:
1 decade ago
Can you explain how the output get -61?
Amit said:
1 decade ago
How is the ASCII value of 3.14 found?
Kiran said:
1 decade ago
Global variables are stored on heap.
Vinod said:
1 decade ago
Can you explain how to came -61.
Vipul said:
1 decade ago
Please give proper explanation.
Raja said:
1 decade ago
It prints -61 that is garbage.
Deepa said:
1 decade ago
Can anyone explain it clearly?
Appaso said:
10 years ago
What is char* and *char?
Vipul said:
1 decade ago
What is heap?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers