/*A PROGRAM REPRESENTING THE WORKING OF MALLOC WITH POINTER || WITHOUT MALLOC */
#include<stdio.h>
#include<stdlib.h>
int main()
{
char *a;
int *temp;
temp=malloc(23);//any much amount of malloc ...is giving u 4 bytes to pointer
printf("sizeof temp=%d\n",sizeof(temp));
//a=malloc(0);//in doing malloc(0)..malloc(1)..malloc(2)..malloc(3)..malloc(4)...either then it will get 4 bytes atleast to pointer....
a="ANU KAMBOJ....MY NAME IS ANU KAMBOJ..I AM LINUX OPERATOR...HELLO THIS IS WORLD OF LINUX...LINUX...THE DESIGNATION OF MR. LINUS TORVALD....THE PASSION OF MR. LINUS TORVALD...C ...LANGUAGE...GIRLFRND OF MR. DENNIS RITCHI......BOTH LINUX & C TOGETHER ...ARE LIFE OF EMBEDDED C...";
printf("sizeof a=%d, address of a=%p.....a=%s\n",sizeof(a),a,a);//i had not done malloc ..still pointer is working..bcz.it has memory which is not taken in use..after a limit ...if i did not used ...malloc ..or realloc ..to get memory..it will give segmentation fault ...that is why there is need to of malloc & realloc is get...