what is difference between array of characters and string

Answer Posted / afaquie ahmed siddiqui

in case character array,each character is located at
contiguous memory location,we can not print them just by the
name.we have to apply some loop opration.
BUT in case of string,a BLOCK of memory is assign to whole
string,we can print them just by string name with %s.
like...
printf("%s",name of string);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the meaning of 2d in c?

617


What are the types of type qualifiers in c?

652


What are pointers?

636


What are unions in c?

585


disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

1633






Multiply an Integer Number by 2 Without Using Multiplication Operator

326


what is the diffrenet bettwen HTTP and internet protocol

1396


Tell me is null always defined as 0(zero)?

677


What is #include called?

573


Compare and contrast compilers from interpreters.

684


What is malloc calloc and realloc in c?

673


main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }

639


Explain Function Pointer?

684


#include #include struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.

5217


What is header file in c?

607