Pages
▼
C program to print Memory Addresses of Variables.
C Program to print Memory Addresses of Variables.
#include<stdio.h>
int main ()
{
int rollno;
char name[10];
printf("Memory Address of rollno variable: %d\n", &rollno );
printf("Memory Address of name variable: %d\n", &name );
return 0;
}Output of the Program:
Memory Address of rollno variable: 2293436Memory Address of name variable: 2293426Note: You may get different memory address on your computer.
* * * * *
No comments:
Post a Comment