How to access or modify the const variable in c ?
Answer Posted / vignesh
@Ramya
const value cannot be changed...you declared it wrong,
int *ptr = &x;
is not correct.It should be,
int ptr = &x;
also,according to your program only the *ptr value is 20 and
not the value of x
| Is This Answer Correct ? | 5 Yes | 51 No |
Post New Answer View All Answers
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
What are the different categories of functions in c?
Explain how do you declare an array that will hold more than 64kb of data?
What is the difference between mpi and openmp?
How #define works?
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
The statement, int(*x[]) () what does in indicate?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
What does the function toupper() do?
How to write c functions that modify head pointer of a linked list?
What is double pointer?
How is pointer initialized in c?
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. The Logic should be written in Data Structures?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
What is the purpose of 'register' keyword?