what is difference between array of characters and string

Answer Posted / punit shukla,hbti-kanpur

1.major difference is: string will have static storage
duration, whereas as a character array will not, unless it
is explicity specified by using the static keyword.
2.Two strings of same value[1] may share same memory area
bt not in the case of char arrays

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do shell structures work?

559


diff between exptected result and requirement?

1592


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

4973


What are register variables in c?

564


Explain how do you determine whether to use a stream function or a low-level function?

616






Explain 'far' and 'near' pointers in c.

695


How do I swap bytes?

626


#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

709


Is that possible to store 32768 in an int data type variable?

685


Can a pointer be volatile in c?

527


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2296


What are the 4 types of functions?

561


general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only

580


With the help of using classes, write a program to add two numbers.

612


how to introdu5ce my self in serco

1517