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
What is the difference between strcpy() and strncpy()?
State the difference between pre and post increment/decrement operations.
What is a block in c++?
What is code reusability in c++?
What are the characteristics of friend functions?
Why is main function important?
What is c++ & why it is used?
What is cout flush?
Differences between private, protected and public and give examples.
What is c++ in english?
If you don’t declare a return value, what type of return value is assumed?
If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?
What is the arrow operator in c++?
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
What does floor mean in c++?