×
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

strcmp in C

strcmp is a function in C which is used to compared two strings that is array of characters and returns if the first array is greater, smaller or equal to the second array

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

qsort in C

qsort in C is an in-built function for sorting array of any data types including structs. It, internally, uses a variant o Quick Sort and is a part of stdlib.h

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

gets() vs fgets() in C and C++

gets() and fgets() are functions in C language to take input of string with spaces in between characters. gets suffer from buffer overflow which is solved by fgets

Harshiv Patel Harshiv Patel
Software Engineering

ctype.h in C

ctype.h header file of the C Programming Language provide several functions that are used to testing different characters and changing some properties.

Amber Price
Software Engineering

Auto in C

Auto is a storage class/ keyword in C Programming language which is used to declare a local variable, forward declaration of nested functions and non-contiguous memory allocation.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

Volatile in C

Volatile in C programming language is a keyword which is used with variables to inform the compiler not to apply any optimizations to code dealing with the variable.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

Extern in C

Extern is a keyword in C programming language which is used to declare a global variable that is a variable without any memory assigned to it. It is used to declare variables and functions in header files.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

Register in C

Register is a keyword in C which suggests the system to use register as a memory for a variable instead of RAM. This accelerates the reading and writing of memory

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

_Bool in C

_bool is a keyword in C Programming language representing boolean data type. It is an alternative to bool in C.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

List of C Compilers (As early as 1973 and with the latest one at 2017)

We have listed all major C compilers that has been in use. Some compilers were developed in 1980s (GNU GCC) while the recent ones are from 2017 (AOCC).

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

#if directive in C / C++

#if is a preprocessor directive in C to define conditional compilation. It can be used just like an if condition statement which impacts the compilation process

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

Scanf and Printf in C

Printf() and Scanf() are inbuilt library functions in C language that perform formatted input and formatted output functions. These functions are defined and declared in stdio.h header file.

Rishabh Singh
Software Engineering

#include in C

#include is a preprocessor directive in C and C++ to include the code from other files (header files + C/ C++ code) in the current file.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

Using Assert.h in C

In this article we'll talk about one of those header files, namely the assert.h header file. First we'll look at the purpose of this file, second we'll go over code examples and in the third part we'll dive a little deeper into the details of this header file and tips on how to use it.

Anton de Regt
Software Engineering

Detect Operating System in C

To check the operating system of the host in a C or C++ code, we need to check the macros defined by the compiler (GNU GCC or G++). For example, on Windows platform, the compiler has a special macro named _WIN32 defined.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

#error directive in C

#error is a preprocessor directive in C which is used to raise an error during compilation and terminate the process.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

Compilation process in C (from code.c to a.out)

Compilation is the process of converting a code in a programming language (C in our case) to machine code. In this process, the code goes through different steps depending upon the compiler and language. We will explore the compilation steps in C.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

Check if a header file in C has been included

To check if an header file has been included or not in a C or C++ code, we need to check if the macro defined in the header file is being defined in the client code.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

#warning directive in C

#warning is a preprocessor directive in C which is used to raise compilation warnings for various situations. It is different from #error directive in that #warning will not cancel the compilation process while #error will cancel it.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

#undef directive in C

#undef is a preprocessor directive to remove an existing macro. It is useful as the only way to update an existing macro is to delete it (using undef) and create a new macro (using define).

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

#define directive in C

#define is a preprocessor directive in C which is used to define macros. Macros are code framents which has been given a name.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

#ifdef directive in C

ifdef is an include guard. ifndef can be seen as if defined then do this till endif. It is opposite of [ifndef directive

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

#ifndef directive in C

ifndef directive is a define directive in C which checks if a MACRO has been defined previously or not. If it has not been defined, it will execute a set of commands. It is followed by endif.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

Memory Leaks in C

In this article, we explored the core reasons for memory leak in C with examples and how we can prevent such situations while writing C code

Abhishek Kumar
Software Engineering

Working with limits.h in C

Limits.h header file in C is used to determine the set limits of variable data stypes. Macros defined in limits.h header file

Kshitiz Saini Kshitiz Saini
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