How to access or modify the const variable in c ?
Answer Posted / mr.x
int main()
{
const volatile int no=10;
int *ptr;
ptr=(int *)&no;
*ptr=30;
printf("%d %d",no,*ptr);
return 0;
}
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the advantages of external class?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What are multibyte characters?
How can I ensure that integer arithmetic doesnt overflow?
Can we replace the struct function in tree syntax with a union?
What are formal parameters?
how is the examination pattern?
How do you generate random numbers in C?
Write a factorial program using C.
What is the explanation for cyclic nature of data types in c?
Write a C program in Fibonacci series.
Which header file is used for clrscr?
how could explain about job profile
what will be the output for the following main() { printf("hi" "hello"); }
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none