what is diffrence between string and character array?
Answer / vadivelt
By default String always ends with NULL character ie., '\0'.
But in character array manually it is needed to terminate
with NULL(You can do this, only when you wanted to use
character array as string)
Eg;
char *p = "Vadivel"; /*By default string is terminated
with '\0'*/
char array[8] = {'V','a','d','i','v','e','l','\0'};
/*Here terminated manually*/
| Is This Answer Correct ? | 9 Yes | 1 No |
What is define c?
There is a number and when the last digit is moved to its first position the resultant number will be 50% higher than the original number.Find the number?
What's the difference between struct x1 { ... }; and typedef struct { ... } x2; ?
write a program to generate 1st n fibonacci prime number
how to execute with out main in cprogram
What is the purpose of 'register' keyword in c language?
what will the following program do? void main() { int i; char a[]="String"; char *p="New Sring"; char *Temp; Temp=a; a=malloc(strlen(p) + 1); strcpy(a,p); //Line no:9// p = malloc(strlen(Temp) + 1); strcpy(p,Temp); printf("(%s, %s)",a,p); free(p); free(a); } //Line no 15// a) Swap contents of p & a and print:(New string, string) b) Generate compilation error in line number 8 c) Generate compilation error in line number 5 d) Generate compilation error in line number 7 e) Generate compilation error in line number 1
What does the function toupper() do?
What is the difference between scanf and fscanf?
How can I allocate arrays or structures bigger than 64K?
What is meant by keywords in c?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...