×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

C Programming

C is a powerful and early programming language which is a former version of C++. It is a procedural language and is used in educational institutions widely.

Software Engineering

Passing Structure to Function in C

In this article, we will learn how to pass structure as a function parameter in C. Before that, we will review the basics of structure in C.

Shamantha Krishna K G Shamantha Krishna K G
Software Engineering

Function Pointer in C

Function pointer in C is a concept where a pointer variable can point to the memory address of a function.

Navya Praniyath
Software Engineering

Pass array in function in C in multiple ways

In this article, we explored how to pass 1D and 2D array as a function parameter. Arguments are passed by value or reference in general

Jyotik Mayur
Software Engineering

Understand Switch case in C

In C, switch statement compares the value of an expression or variable against a list of case values and when a match is found the block of statements associated with that case is executed.

Janvi Talreja
Software Engineering

Learn everything about variables in C

In this article, we will take a look into variables of different data types in C, how to get memory address and pointer to a variable and others.

Asha Sulaiman Asha Sulaiman
Software Engineering

Using if else if statement in C

if else if is a conditional statement that allows a program to execute different code statements based upon a particular value or expression. It is natively supported in C programming language

Abhishek Kumar
Software Engineering

Understanding and working with Memset in C

memset is a memory utility in C which is used to set a particular value to a range of memory locations in an efficient way. On going through this article, you will understand How to use memset? and Why performance of memset is better than a simple implementation?

Bharat Arya Bharat Arya
Software Engineering

Working with Typedef in C

typedef is a keyword in C programming language,which stands for type definition. How to use typedef? Why and when to use typedef? Difference between typedef and define

Bharat Arya Bharat Arya
Software Engineering

boolean (bool or _Bool) datatype in C

C programming language (from C99) supports Boolean data type (bool) and internally, it was referred as `_Bool` as boolean was not a datatype in early versions of C. In C, boolean is known as bool data type. To use boolean, a header file stdbool.h must be included to use bool in C.

Bharat Arya Bharat Arya
Software Engineering

Working with character (char) in C

C uses char type to store characters and letters. However, the char type is integer type because underneath C stores integer numbers instead of characters. Characters supported by a computing system depends on the encoding supported by the system.

Bharat Arya Bharat Arya
Software Engineering

Representing Strings in C

Compared to other languages, C is a low-level language. It does not have any specific data-type specific for a String. Since there is no built-in data-type in C language for String, it is handled using an array of characters. A String in C can be defined as an array of characters.

Sagar
C Programming

Union in C

A union is a special data type available in C that allows to store different data types in the same memory location. You can define a union with many members, but only one member can contain a value at any given time. Unions provide an efficient way of using the same memory location for multiple use

Harshita Sahai Harshita Sahai
C Programming

do while loop in C

Do while loop in C is an exit controlled loop and hence, it executes at least once even when the test-expression is false initially. We illustrate the concept and usage in C with different examples

Shreya Rastogi
C Programming

While loop in C

Order execution of while loop in C is control variable is initialized, test expression is evaluated, if it evaluates to true, the loop enters the body and it is repeatedly executed, till the expression does not evaluate to false. When the test expression evaluates to false, the loop is exited.

Shreya Rastogi
C Programming

continue statement in C

The continue statement is a jump statement in C. It is another one of the jump statements like the break statement as both the statements skip over a part of the code. But the continue statement is somewhat different from the break statement. It forces the next iteration of the loop to take place

Shreya Rastogi
C Programming

Storage classes in C

A Storage Class defines the scope (visibility) and life-time of variables and/or functions within a C Program. They precede the type that they modify. Storage classes are used in C programming are Automatic variables (auto), External variables (extern) Static variables (static) and Register variable

Kavita Bisht
C Programming

Dynamic memory allocation in C

The process of allocating memory at run time is known as dynamic memory allocation. Although C does not inherently have this facility, there are four library routines that can be used for allocating and freeing memory during program execution: malloc, calloc, realloc and free

Shreya Gupta Shreya Gupta
C Programming

Static memory allocation in C

In C, the default way of memory allocation is static. Static memory allocation is an allocation technique which allocates a fixed amount of memory during compile time and the operating system internally uses a data structure known as Stack to manage it We define static variables and how to delete it

Shreya Gupta Shreya Gupta
Software Engineering

goto statement in C

The goto statement is a jump statement which is sometimes also referred to as unconditional jump statement. The goto statement can be used to jump from anywhere to anywhere within a function. The use of goto statement is highly discouraged and can be avoided using break and continue statements.

Harshita Sahai Harshita Sahai
Software Engineering

Break Statement in C

Break Statement is a loop control statement which is used to terminate the loop. As soon as the break statement is encountered from within a loop, the loop iterations stops there and control returns from the loop immediately to the first statement after the loop. break can be used in all loop

Harshita Sahai Harshita Sahai
Software Engineering

Error Handling in C

In C when some error occurs then -1 or NULL value is returned and a global variable errno is set with the error code.Hence we use returned values to check errors. We use EXIT_SUCCESS ,EXIT_FAILURE to deal with errors. There are three types of errors syntax, logical and semantic.

Vartika Yadav
Software Engineering

Functions in C

A function in C is a set of statements that take inputs, do some specific computation and produces output. The idea is to put some commonly or repeatedly done task together and make a function, so that instead of writing the same code again and again for different inputs, we can call the function.

Harshita Sahai Harshita Sahai
Software Engineering

An in-depth look into Recursion in C

Recursion is a coding technique/ design in which a function calls itself directly or indirectly and the corresponding function is called as recursive function. Using this many problems can be solved easily with less time. C, C++, Java, Python, Go and others support Recursion except Fortan 77

Harshita Sahai Harshita Sahai
Software Engineering

malloc vs calloc vs realloc

We take a deep look into the 3 dynamic memory allocation techniques in C/ C++ namely malloc, calloc and realloc and explore the difference. malloc stand for memory allocations, calloc for contiguous allocation and realloc for re-allocation.

Harshita Sahai Harshita Sahai
Software Engineering

for loop in C

Loop is a programming concept which is natively supported by C. Loops are used to repeat a particular coding task where each repetition follows a particular pattern which can be incorporated in a code. Example of such a task is printing integers from 1 to 10.

Harshita Sahai Harshita Sahai
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship