Strings in C

In this article, you’ll learn about strings in C programming. 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’. Example : char name[] = “first name” ; Declaration of strings : When the compiler encounters a sequence of characters enclosed… Read More »

Union in C

In this article, you’ll learn about unions in C programming. More specifically, how to create unions, access its members and learn the differences between unions and structures. User defined data type : Union Like structures in C, union is a user defined data type. In union, all members share the same memory location. Unions are conceptually similar to… Read More »

Structures in C

A structure is a user defined data type in C. A structure creates a data type that can be used to group items of possibly different types into a single type. Structure is similar as Array, but only difference is that array allows only similar data type that can be stored in contiguous manner, but structure can stores… Read More »

Data Types in C | Set 1

Data types define the type of data a variable can hold. C language has some predefined set of data types to handle various kinds of data that we can use in our program. These datatypes have different storage capacities. In C programming, data types are declarations for variables. This determines the type and size of data associated with… Read More »

Hello World Program in C

In this article, you will learn to print “Hello, World!” on the screen in C programming. Most students of programming languages, start from the famous ‘Hello World’ code. This program prints ‘Hello World’ when executed. In the first program we are displaying the message using printf function and in the second program we are calling a user defined… Read More »

C standard library

Prerequisite – C language C standard library (libc) is the standard library for the C programming language, as specified in the ANSI C standard. C standard library is also called the ISO C library. The C library functions are provided by the system and stored in the library. The C library function is also called an in-built function… Read More »