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: scanf( format-control-string, other-arguments ); Example: double num; scanf("%lf", num); /* Wrong */ scanf("%lf", &num); /*

Structure and function in C programming

In this tutorial, we will learn how to pass structures as argument to a function and how to manipulate the structure. Functions and structure together helps to make the program in Object Oriented. Example : object-oriented program design. Consider a structurethat represents a complex number type. typedef struct { double real; double imag; } Complex; Construct

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: FunctionWork of Functionstrlen()Calculates the length of stringstrcpy()Copies a string to another stringstrcat()Concatenates(joins) two stringsstrcmp()Compares two stringstrlwr()Converts string to lowercasestrupr()Converts string to uppercase Above function will be

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.  fig: pointer in C programming Here, the above image shows the layout of computer

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 dimensionalTwo dimensional………n dimensional Array declaration in C We