Category: C Programming

Input/Output in C programming

In this tutorial, we will learn about the ‘input output operation in C’. We will focus on the most commonly used functions of some standard library scanf() and printf(). Formatted Input: scanf() Scanf() function obtains data from input source, keyboard.   Syntax: Example: scanf() reads the data provided from standard input and process them to the specified

Strings and the Standard Library

In this tutorial, we will learn about the predefined function declared in the header file string.h. The standard library contains many functions for manipulating strings. Some of the functions: Function Work of Function strlen() Calculates the length of string strcpy() Copies a string to another string strcat() Concatenates(joins) two strings strcmp() Compares two string strlwr()

Pointers and Arrays in C programming

In this tutorial, we will learn how the pointers and arrays in C are related, difference between pointers and arrays. Pointers and arrays are strongly related. Whenever an array name appears in an expression, it is automatically converted to a pointer to its first element. Example: In above example,  a will refer to the address  2886728 . As &a[0] references

Pointers in C programming

In this tutorial, we will learn the about the pointers in c, how do they help in programming and how does it function. Pointers First of all before starting pointer one should have knowledge about how memory is organized in C.  Here, the above image shows the layout of computer memory simply. When a variable

Arrays in C programming

In this tutorial, we will learn about the arrays in C programming and ways to declare, initialize and  access it. An array is a collection of data items, all of the same type and having fixed size.  We can represent array in n-dimension. For example , One dimensional Two dimensional ……… n dimensional Array declaration

Types of user-defined functions in C programming

Aside from using predefined function provided by C programming. We can create our own function to perform specific task in program. Those function created by user are called user-defined functions. Each C program must have at least one function, which is main(). Example of user-defined function Output Function Prototype Function prototype is just the declaration