wats the diference btwen constant pointer and pointer to a
constant.pls give examples.
Answer Posted / jamili reddy
int i =12;
int * const ptr = 24; //constant pointer
you can't change the ptr value
const int *ptr = 24;//ptr to a constant
int const * ptr = 24;//ptr to a constant
you can't change the value at ptr
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the purpose of 'register' keyword in c language?
write a c program to find the sum of five entered numbers using an array named number
What is malloc calloc and realloc in c?
List out few of the applications that make use of Multilinked Structures?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
What is a spanning Tree?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
.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; }
Explain the difference between malloc() and calloc() function?
What is the scope of an external variable in c?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
What is a stream?
How to get string length of given string in c?
Are the variables argc and argv are always local to main?