differentiate between
const char *a;
char *const a; and
char const *a;
Answer Posted / vignesh1988i
const char *a : means the string is constant and the pointer
is not...
const char *a="HELLO WORLD" , if we take this example for
the whole scope of the program the string is constant and we
can't assign any other string to that pointer 'a'....
char * const a : means the pointer is constant (address) but
string is not......
char * const a="hello world" , if we take this example ,
here the address will be always constant.... string can vary..
char const *a : means string is a constant and pointer is
not..... as we have seen from the first example...
thank u
| Is This Answer Correct ? | 37 Yes | 2 No |
Post New Answer View All Answers
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
Explain the use of fflush() function?
Why c language?
Define circular linked list.
What is array in c with example?
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.
Is struct oop?
I have a varargs function which accepts a float parameter?
How is a pointer variable declared?
what is the syallabus of computer science students in group- 1?
Are global variables static in c?
What is strcpy() function?
Explain how can I convert a number to a string?
What is the use of void pointer and null pointer in c language?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record