C Programming - Const - Discussion
Discussion Forum : Const - Find Output of Program (Q.No. 5)
5.
What will be the output of the program in TurboC?
#include<stdio.h>
int fun(int **ptr);
int main()
{
int i=10, j=20;
const int *ptr = &i;
printf(" i = %5X", ptr);
printf(" ptr = %d", *ptr);
ptr = &j;
printf(" j = %5X", ptr);
printf(" ptr = %d", *ptr);
return 0;
}
Discussion:
28 comments Page 3 of 3.
Sharath said:
1 decade ago
We can change the value of constant pointer
Suyog said:
9 years ago
Please, can anybody explain it detail?
Abhishek said:
1 decade ago
Can't understand? please explain?
Dhivya.s said:
6 years ago
Please explain how FFF4 from ptr?
Appu said:
7 years ago
Please explain the given code.
Varinder said:
1 decade ago
How constant may change?
Akshay11 said:
1 decade ago
What does %5x means?
Debasisd16061 said:
1 decade ago
What is %5x?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers