134. Difference between character array and string.
#include<stdio.h>
char
a[]={'a','b','c','d'};
char
s[]="abcd";
void
main()
{
printf(" Size of a = %ld \n Size of s
= %ld ", sizeof(a),sizeof(s));
}
#include<stdio.h>
char
a[]={'a','b','c','d'};
char
s[]="abcd";
void
main()
{
printf(" Size of a = %ld \n Size of s
= %ld ", sizeof(a),sizeof(s));
}
Comments
Post a Comment