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

Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)

1736


How to declaring variables in c++?

914


Describe about storage allocation and scope of global, extern, static, local and register variables?

1036


What is the use of default constructor?

840


Explain register storage specifier.

811


What are the two types of comments?

790


Which is the best c++ software?

853


Can a list of string be stored within a two dimensional array?

790


What is stoi in c++?

953


What is setbase c++?

850


What is #include cmath?

864


In c++, what is the difference between method overloading and method overriding?

847


Explain what are accessor methods?

896


which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?

994


Is linux written in c or c++?

815