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

Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300

1783


Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?

1734


Where the memory to the static variables is allocated?

556


What is lambda in c++?

573


Is c the same as c++?

562






Is nan a c++?

610


Should I learn c++ c?

605


Where Malloc(), Calloc(), and realloc() does get memory?

607


Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).

629


What character terminates all character array strings a) b) . c) END

668


Explain rethrowing exceptions with an example?

604


How one would use switch in a program?

611


Describe the syntax of single inheritance in C++?

641


Is c++ still in demand?

632


What is a virtual destructor? Explain the use of it?

543