C Pointers With Examples

Pointers are special variables that are used to store addresses rather than values. Assigning addresses to Pointers : Here, the address of c is assigned to the pc pointer. To get the value stored in that address, here used *pc. Example: Output : Explanation of the program: pc = &c; This assigns the address of variable c to the pointer pc. *pc = …

Read more

File Handling in C

C programs are done on a terminal that is not stored anywhere. In the software industry, most programs are written to store the information fetched from the program. One such way is to store the fetched information in a file. Why files are needed? If you have to enter a large number of data, it …

Read more

Quick Sort in C

Explain the algorithm for QUICK sort ( partition exchange sort) and give a suitable example. Quick sort is based on partition. It is also known as partition exchange sorting. The basic concept of quick sort process is pick one element from an array and rearranges the remaining elements around it. This element divides the main …

Read more

SORTING IN C PROGRAMING

Explain in detail about sorting and different types of sorting techniquesSorting is a technique to rearrange the elements of a list in ascending or descending order, which can be numerical, lexicographical, or any user-defined order. Sorting is a process through which the data is arranged in ascending or descending order. Sorting can be classified in …

Read more

Searching in C Programming

Searching is the process of finding element in a given list. In this process we check item is available in given list or not. Type of searching Internal search External search Internal Search: In this search, Searching is performed on main or primary memory.External Search: In this search, Searching is performed in secondary memory. There …

Read more

Strings in C

Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\0’( NULL character ). String is a one dimensional array of character. We can initialize the string as char name[]={‘r’,’a’,’j’,’u’,’\0’}; Here each character occupies 1 byte of memory and …

Read more

Array In C Program:

Introduction To Arrays:In C programming, one of the frequently problem is to handle similar types of data. For example: if the user wants to store marks of 500 students, this can be done by creating 500 variables individually but, this is rather tedious and impracticable. These types of problem can be handled in C programming …

Read more

C Recursion

The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called as recursive function. Using recursive algorithm, certain problems can be solved quite easily. WAP in C to Calculate the factorial of a number using recursion Output WAP in C to GCD of Two Numbers using …

Read more

Functions in C Programming With Examples

A function is a group of statements that together perform a task. Every C program has at least one function, which is main(), and all the most trivial programs can define additional functions.You can divide up your code into separate functions. How you divide up your code among different functions is up to you, but logically …

Read more

C Loops: For, While, Do While, Looping Statements with Example

Loop: The versatility of the computer lies in its ability to perform a set of instructions repetedly. This involves repeating some portion of the program either a specified number of times or until aparticular condition is being satisfied. This repetitive operation is done through a loop control instruction. There are three methods by way of …

Read more