What is a const pointer, and how does it differ from a pointer to a const?
Answer Posted / glibwaresoftsolutions
1. Pointer to const: The value being pointed to cannot be modified, but the pointer itself can change.
Example:
2. const int a = 10;
3. const int *ptr = &a; // *ptr is read-only
4. const pointer: The pointer cannot change, but the value it points to can.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is bss in c?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What is stack in c?
What is the difference between malloc calloc and realloc in c?
Why do we use stdio h and conio h?
How to declare pointer variables?
C program to find all possible outcomes of a dice?
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
If null and 0 are equivalent as null pointer constants, which should I use?
What is a macro in c preprocessor?
application attempts to perform an operation?
What is #include in c?
Can main () be called recursively?
What is calloc() function?
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if