More stories

  • in

    Enumeration in C

    In this article, you will learn to work with enumeration (enum). Also, you will learn where enums are commonly used in C programming. An enumeration is a user-defined data type that consists of integral constants. To define an enumeration, keyword enum is used. enum flag { const1, const2, …, constN };   Here, name of the enumeration […] More

  • in

    Introduction to Files Input/Output

    There are a large number of functions to handle file I/O (Input Output) in C. In this tutorial, you will learn to handle standard I/O in C using fprintf(), fscanf(), fread(), fwrite(), fseek.and more. In C programming, file is a place on your physical disk where information is stored. Why files are needed? When a […] More

  • in

    Introduction to Unions 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. Unions are quite similar to structures in C. Like structures, unions are also derived types. union car { char name[50]; int price; }; Defining a union is as easy […] More

  • in

    Structures & Functions in C

    In this article, you’ll find relevant examples to pass structures as an argument to a function, and use them in your program. In C, structure can be passed to functions by two methods: Passing by value (passing actual value as argument) Passing by reference (passing address of an argument) Passing structure by value A structure variable can be passed to […] More

  • in

    Structures & Pointers in C

    In this article, you’ll find relevant examples that will help you to work with pointers to access data within a structure. Structures can be created and accessed using pointers. A pointer variable of a structure can be created as below: struct name { member1; member2; . . }; int main() { struct name *ptr; } Here, the […] More

  • in

    Introduction to Structures in C

    In this article, you’ll learn about structures in C programming; what is it, how to define it and use it in your program. Structure is a collection of variables of different types under a single name. For example: You want to store some information about a person: his/her name, citizenship number and salary. You can easily […] More

  • in

    String Manipulations in C

    In this article, you’ll learn to manipulate strings in C using library functions such as gets(), puts, strlen() and more. You’ll learn to get string from the user and perform operations on the string. You need to often manipulate strings according to the need of a problem. Most, if not all, of the time string manipulation can […] More

  • in

    Introduction to Strings in C

    In this article, you’ll learn to handle strings and its operations in C. You’ll learn to declare them, initialize them and use them for various input/output operations. In C programming, array of characters is called a string. A string is terminated by a null character /0. For example: “c string tutorial” Here, “c string tutorial” is […] More

  • in

    Memory Allocation in C

    In this article, you’ll learn to dynamically allocate memory in your C program using C standard library functions: malloc(), calloc(), free() and realloc() In C, the exact size of array is unknown until compile time, i.e., the time when a compiler compiles your code into a computer understandable language. So, sometimes the size of the […] More

  • in

    Pointers & Functions in C

    In this article, you’ll learn to pass pointers as an argument to the function, and use it efficiently in your program. When a pointer is passed as an argument to a function, address of the memory location is passed instead of the value. This is because, pointer stores the location of the memory, and not the value. Example […] More

  • in

    Pointers and Arrays in C

    In this article, you’ll learn about the relation between arrays and pointers, and use them efficiently in your program. Arrays are closely related to pointers in C programming but the important difference between them is that, a pointer variable takes different addresses as value whereas, in case of array it is fixed. This can be demonstrated by an […] More

  • in

    Introduction to Pointers in C

    In this article, you’ll learn about pointers; what are they, how do you use them and the common mistakes you might face when working with them. Pointers are powerful features of C and (C++) programming that differentiates it from other popular programming languages like: Java and Python. Pointers are used in C program to access […] More

Load More
Congratulations. You've reached the end of the internet.