Mar
25
//string initialization
#include<stdio.h>
#include<stdlib.h>
void main(){
//char nm[40]=”Hello”;
//printf(“%d\n”,sizeof(nm));
//char nm[]=”Hello”;
//printf(“%d\n”,sizeof(nm));
//char nm[]={‘H’,’e’,’l’,’l’,’o’,’\0′};
//printf(“%d\n”,sizeof(nm));
char nm[40]={‘H’,’e’,’l’,’l’,’o’};
printf(“%d\n”,sizeof(nm));
//nm[40]=”Hello”;
//nm[3]=’A’;
printf(“%s”,nm);
}
Leave a Reply
No Comments