What is the difference between Char a[ ]=”string” and char
*a=”String”
Answer Posted / vincy
the syntax for a character variable is wrong if we use a
pointer variable as given above that is char*a="string". so
i think the first one is right.we know that the pointer
variable points to the value in the particular address, then
it should not the "string" but "&string".
Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
Explain the difference between new() and malloc() in c++?
What is meant by iomanip in c++?
What is c++ hash?
How does a copy constructor differs from an overloaded assignment operator?
Define a constructor?
What is the difference between a "copy constructor" and an "assignment operator" in C++?
Incase of a function declaration, what is extern means?
why and when we can declar member fuction as a private in the class?
What is the difference between a template and a macro?
Discussion on error handling of C++ .
What is a tree in c++?
What is a literal in c++?
What is an operator function? Describe the function of an operator function?
What are enumerations?
What language is a dll written in?