//WAP TO DEFINE A STRING USING POINTER NOTATION & ARRAY NOTATION
#include<conio.h>
#include<stdio.h>
void main()
{
char str1[]="Defined As An Array";
char *str2="Defined As A Pointer";
clrscr();
printf("\n\n%s",str1);
printf("\n\n%s",str2);
printf("\n\n%s",str2+5);
getch();
}
/***************************************************************
OUTPUT
***************************************************************
Defined As An Array
Defined As A Pointer
ed As A Pointer
*/
No comments:
Post a Comment