What is a Linked List in C ? Linked List = List is Linked. The term ‘list’ refers to a linear collection of data. One form of linear list are arrays in which elements are stored in memory by means of sequential (contiguous) memory locations. Another form of linear list are linked lists. “Linked list…

## Pointer to Structure – Basics

 Pointer to Structure Structure is a User Defined Data Type. Before discussing Pointer to Structure, you must know about Structures. Example of a Structure : struct node { int a; float b; char c[2]; }; Point No 1 : It is a mixture of various data types. Point No 2 : Memory of a structure (Assume 16-bit Processor)…

## Difference Between Structure and Union

 Difference Between Structure and Union Before discussing difference between structure and union, Let us discuss some similarities between them. Similarities between Structure and Union: Both structure and union are user defined data types. Both structure and union are container data types and both contains variable of different data types. Both structure and union have same…

## Programs on Pointer to Array

 Programs on Pointer to Array or on Multidimensional Arrays using Pointers Before Solving the Programs on Pointer to Array or on multidimensional array using pointers, Read out the Basics on the following link : Link : http://www.edugrabs.com/pointer-to-array-or-access-multidimensional-arrays-using-pointers/ Program Number 1 : Let the base address of array arr2D[3][3] is 1000. main() { int arr2D[3][3]; printf(“%d”, (arr2d==*arr2d)…

## Function Pointer in C

 Function Pointer in C Function Returning Pointer Consider a simple program : main() { int *x; x=fun(); printf(“%u”,x); } int* fun() { int y=10; return &y; } Output of the Program : 2000 Explanation : So, It means that function is returning a pointer. Functional Pointer Consider a simple program to understand the meaning of…

## Pointer to Structure Example

 Pointer to Structure Example Before Discussing  Pointer to Structure Example, Read out the basics on Structure and Pointers on the following link. Link : http://www.edugrabs.com/pointer-to-structure-basics/ Program No 1 : main() { struct s1 { char *z; int i; struct s1 *p; }; Struct s1 a[] = { {“NAGPUR”, 1, a+1} {“RAIPUR”, 2, a+2} {“KANPUR”, 3, a}…

## Pointer to Array or Access Multidimensional Arrays Using Pointers

 Pointer to Array or Access Multidimensional Arrays Using Pointers ?? Before discussing Pointer to Array or how to access multidimensional arrays using Pointers, you must know about Multidimensional Arrays. Now, Consider a 2 Dimensional array a[3][4]: How does the following statement solve ?? 1. a = base address of array = 1000 2. a[0] can be written as…

## Arrays and Pointers in C Examples for GATE Students

 Arrays and Pointers in C Examples for GATE Students Basic Tip : Between Unary and Binary Operator, the priority of Unary Operator is more than Binary Operator. How to solve these type of Programs in GATE Exam ? Program No 1 : Consider the following Program : main() { char *s[] = {“iceman”, “green”, “cone”, “please”};…

## Arithmetic Operations on Pointers for GATE Students

 Arithmetic Operations on Pointers for GATE Students Basics Before Solving the Programs : Basic Tip : Priority and Associativity between Increment/Decrement (++ or –) Operator and Deferencing Operator(*) : Priority between ++/– and * : Same Priority Associativity : Right to Left Consider the following statements in C++ : 1. int a [] = {0,1,2,3,4};…

# Console input output operations

Console Input Output Operations Every program takes some input and generates the processed data as output. So, each and every programming language provide facilities for handling input and output operations. C++ or C also is practically unique in its approach to input output operations. This is because the C++ language has no defined keywords that perform…