Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2750


What are the different categories of functions in c?

1138


Explain how do you declare an array that will hold more than 64kb of data?

1460


What is the difference between mpi and openmp?

1306


How #define works?

1115


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)

2347


The statement, int(*x[]) () what does in indicate?

1154


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

1308


What does the function toupper() do?

1138


How to write c functions that modify head pointer of a linked list?

992


What is double pointer?

1008


How is pointer initialized in c?

1033


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?

2465


What is Dynamic memory allocation in C? Name the dynamic allocation functions.

1420


What is the purpose of 'register' keyword?

1103