What is the difference between char a[] = "string"; and
char *p = "string"; ?
Answer Posted / mak
in case of array size of it become fixed after initialization,
so a string of length greater than the size of previous string can't be assigned to array.
on the other hand pointer can take variable size string as it stores only the first address.
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Explain the term printf() and scanf() used in c language?
Difference between pass by reference and pass by value?
write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
Explain how do you determine whether to use a stream function or a low-level function?
What is the difference between far and near in c?
write a program to generate address labels using structures?
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
What are the ways to a null pointer can use in c programming language?
Explain why can’t constant values be used to define an array’s initial size?
How to get string length of given string in c?
show how link list can be used to repersent the following polynomial i) 5x+2
What is the difference between strcpy() and memcpy() function in c programming?
What is the correct code to have following output in c using nested for loop?