what is the difference between char * const and const char
*?
Answer Posted / brindha
Char* const p -> Here pointer P is a const pointer, which
means that this pointer can point to only one memory
location. eg. char* const p = &arr;
p++ ; -> This is invalid
const char* p -> this indicates that the data pointed by
the pointer p is constant & the value in that address
cannot be modified. eg. const char* p = 'a';
*p = 'b'; -> This is invalid
Is This Answer Correct ? | 30 Yes | 2 No |
Post New Answer View All Answers
When we use void main and int main?
List out few of the applications that make use of Multilinked Structures?
c program to compute AREA under integral
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
What are the advantages of c language?
What are the main characteristics of c language describe the structure of ac program?
When should I declare a function?
What is the difference between struct and typedef struct in c?
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
What is property type c?
Write a program of advanced Fibonacci series.
How is a null pointer different from a dangling pointer?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
How many loops are there in c?
shorting algorithmS