Difference Between Structure and Pointer in C
Hello Friends Today we will learn about difference between structure and pointer in C
Structure in C refer to a collection of various data types.
While pointer refer to address in C & are used to point some particular place in C memory.
Structure Syntax
struct node
{
int data; struct node *next;
};
Pointer Syntax
#include <stdio.h>
int main ()
{
int *ptr = NULL;
printf("The value of ptr is : %x\n", ptr );
return 0;
}
No comments :
Post a Comment