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
Simplify the program segment if X = B then C ← true else C ← false
Give basis knowledge of web designing ...
What is wrong with this declaration?
find the sum of two matrices and WAP for it.
What standard functions are available to manipulate strings?
What is the significance of scope resolution operator?
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
What is the difference between formatted&unformatted i/o functions?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
Write programs for String Reversal & Palindrome check
provide an example of the Group by clause, when would you use this clause
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
If fflush wont work, what can I use to flush input?
What are local variables c?