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
What is the Purpose of 'extern' keyword in a function declaration?
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
What is string concatenation in c?
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
What is I ++ in c programming?
How does normalization of huge pointer works?
Between macros and functions,which is better to use and why?
What is pass by value in c?
difference between Low, Middle, High Level languages in c ?
writ a program to compare using strcmp VIVA and viva with its output.
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
What does != Mean in c?
Differentiate between declaring a variable and defining a variable?
Can you please explain the scope of static variables?
What is difference between class and structure?