Double Pointer (Pointer to Pointer) in C with Example

This C Tutorial Explains Pointer to Pointer or Double Pointer in C Programming with Examples. What is a Double Pointer in C? Basically, a pointer holds address; address of some variable, pointer variable, function, structure, array etc. When pointer holds address of some other pointer variable it’s called pointer-to-pointer or double pointer. Syntax for a … Read more

advertisement

Pointer Arithmetic in C with Examples

This C Tutorial Explains Pointer Arithmetic in C Programming with examples. In the C programming language, there are only a few operations that can be performed on Pointers. Different Pointer Operations in C: Increment and Decrement of a Pointer Addition and Subtraction of a Pointer Subtraction of Two Pointers Relational Operations on Pointers Comparison of … Read more

advertisement

Which Pointer Expressions in C Programming are referred to as L-Values?

Question: Which Pointer Expressions in C Programming are called as L-Values? Answer: We already know that lvalue refers to some location or storage used by some data object, for example: variables, arrays, structures, pointers etc. Further, ‘l’ in lvalue stands for left side of assignment “=” operator meaning that left side of assignment must be … Read more

advertisement

NULL Pointer Indirection in C with Examples

This C Tutorial Explains Indirection of a NULL Pointer in C Programming and Describes Pros and Cons of Null Pointer, with examples. As we know that a NULL pointer is one that points to nowhere in memory. For example: int *ip = 0; /* ‘ip’ is a pointer-to-int initialized with value zero */ In the … Read more

advertisement

NULL Pointer in C

This C Tutorial Explains NULL Pointer in C Programming with Examples. What is NULL Pointer in C? A NULL Pointer in C is a special type of pointer which points to nowhere i.e. not anywhere. Pointers declared in the program but not initialized contain garbage addresses, pointing to locations beyond the storage allocated to program … Read more

advertisement

Addressof Operator and Register Variable in C

Question: Can we use address of Operator (&) to Determine Address of a Register Variable in C Answer: addressof operator ‘&’ is a unary operator fetches us address of its operand/data object occupied in memory. But registers are not the part of memory. Instead, these are components of CPU. Further, there are only a few … Read more

advertisement

Difference between Expression and Statement in C

Question: What is the Difference Between Pointer to Constant and Regular Pointer in C Language Answer: O key! First, we try to understand what a regular pointer is, how is this declared, initialized and used in a C program? Consider a program, for example: /* * diff_regptr_and_ptr2const1.c — Program shows what happens when regular * … Read more

advertisement

Difference between Pointers, const type * pname, type * const pname, and const type * const pname in C

Question: What is the Difference Between Various Pointers, const type * pname, type * const pname, and const type * const pname in C Answer: We are already familiar with symbolic constants created using ‘const’ keyword. For example: /* sym_const.c — Program creates and accesses symbolic constant */ #include <stdio.h>   int main(void) { const … Read more

advertisement

What is Pointer Compatibility in C Programming?

This C Tutorial Explains the Concept of Pointer Compatibility in C Programming with Examples. The rules for assigning one pointer to another are tighter than the rules for numeric types. For example, you can assign an int value to a double variable without using a type conversion, but you can’t do the same for pointers … Read more

advertisement

Pointer Constants in C with Examples

This C Tutorial explains Pointer Constants in C and Define their Purposes with Examples. Every location, specifically every byte, in memory has an address. This address itself is a constant, so is a pointer constant. Remember that left side of assignment operator ‘=’ must be a Modifiable LValue meaning that expression on the left side … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.