What is the difference between Char a[ ]=”string” and char
*a=”String”

Answer Posted / vikram

char a[]="string" refers that string has constant length and it will reserve fixed memory while in case of char *a="string" the string has variable length

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is map sorted c++?

749


What are 2 ways of exporting a function from a dll?

874


Is it possible to write a c++ template to check for a function's existence?

800


What do you mean by a template?

840


What does floor mean in c++?

816


What is the use of endl in c++?

794


Is c++ a difficult language?

785


What is polymorphism and its type in c++?

789


What are pointer-to-members in C++? Give their syntax.

872


Differentiate between a template class and class template in c++?

850


Can we use clrscr in c++?

840


How a pointer differs from a reference?

987


What do you mean by volatile and mutable keywords used in c++?

777


What is meant by a delegate?

812


How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?

845