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
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
What is volatile keyword in c?
What is the difference between declaring a variable and defining a variable?
What does %p mean?
Write a program to maintain student’s record. Record should
not be available to any unauthorized user. There are three
(3) categories of users. Each user has its own type. It
depends upon user’s type that which kind of operations user
can perform. Their types and options are mentioned below:
1. Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record)
2. Super Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record, Delete Single Record)
3. Guest
(Search Record [by Reg. No or Name], View All Records)
When first time program runs, it asks to create accounts.
Each user type has only 1 account (which means that there
can be maximum 3 accounts). In account creation, following
options are required:
Login Name: <6-10 alphabets long, should be unique>
Password: <6-10 alphabets long, should not display
characters when user type>
Confirm Password:
What is the difference between #include
Why isnt there a numbered, multi-level break statement to break out
What is meant by operator precedence?
Is using exit() the same as using return?
What does malloc () calloc () realloc () free () do?
Can main () be called recursively?
Why do we use return in c?
What is switch in c?
diff between exptected result and requirement?