C/C++

File Handling in C

File Handling in C

In this part you will learn: 1. Filling 2. C syntax 3. Showing output In this tutorial I will teach you about the concept of Filing in C. You will learn how to read from a file and how to write in a file. What is Filing? In C language we use filing to keep several records. We build certain programs to write our data in the file and to read our data from the file.

Introduction to Structures

Introduction to Structures

In this part you will learn: 1. What are Structures 2. How to use structure in Programs 3. C syntax 4. Showing output What are Structures? Just like a simple variable type like int, float etc we can define our own data type so that whenever we make a variable of that type , it contains all the variables as defined by user automatically. Structures can contain multiple variables of different data type under one name. Structures allow us to access different variables by using a single pointer.

Introduction to Pointers

Introduction to Pointers

In this part you will learn: 1. What are Pointers 2. How to use them in Programs 3. C syntax 4. Showing output What are Pointers? Our computer stores variables in the memory so they can be accessed by the compiler for processsing. The compiler sets aside a memory location with a unique address to store that variable.

Functions and Global Variables in C

Functions and Global Variables in C

In this part you will learn: 1. Functions 2. Global Variables 3. C syntax 4. Showing output In this tutorial I will teach you how to use functions and global variables in C. What are Functions? Function provides a way in C programming to group instructions as a single unit and give it a name. Function provides many benefits. Using function, a bigger task is divided into many sub-tasks and each sub-task is solved as a function/module. Furthermore, a function can be used/called repeatedly in C program.

Flag Waving Using C

This is a simple C program. You can run this program in c compilers. In this program, dda line algorithm is used to plot the flagpole etc. By repeating algorithm in different position of the window, it look like waving in screen. You can enjoy it. Any queries contact me. #include #include #include #include #include void dda(float x1,float y1,float x2,float y2,int z) { float dx,dy,x=x1,y=y1,m; int

Learning 2-Dimentional Arrays

Learning 2-Dimentional Arrays

In this part you will learn: 1. 2D Arrays 2. C syntax 3. Showing output In this tutorial I will teach you about 2D Arrays. We will cover what is a 2D array and how does a 2D array work. What is a 2D Array? In simple words a 2D array is simply and array of array. We have multiple rows and columns in a 2D array. We have learnt previously how we access elements of array by simply accessing the different indexes of array using subscripts.

Introduction to Arrays

Introduction to Arrays

In this part you will learn: 1. Arrays 2. Sorting using arrays 3. Constants 4. Showing output In this tutorial I will teach you how to use arrays. What is an Array ? An array is a set of variables which you can declare in a single statement. For example if you want to make a result calculating program you need to declare the total number of students first. So instead of declaring student1, student2 etc you can write int students[40]; in this way we declared 40 variables in a single statement.

Learning Do while LOOP

In this part you will learn: 1. Do while LOOP 2. C syntax 3. Showing output In this tutorial I will teach you how to use do while loops in C. We have already covered for loops and now we know what are loops. In this tutorial I will teach you how to use a Do while loop in C. We have previously covered how to use a and now we know how loops work. What is a DO WHILE LOOP? A Do while loop is somewhat similar to a While loop. It has there necessary statements initialization, condition and increment.

Learning While LOOP

While LOOP

In this part you will learn: 1. While LOOP 2. C syntax 3. Showing output In this tutorial I will teach you how to use while loops in C. We have already covered for loops and now we know what are loops What is a WHILE LOOP ? First of all we will talk about what is while loop. For a loop we need three statement initialization, condition and increment. In a while loop we only write the condition within the round brackets and increment within the body of the loop.

Nested For LOOPS

Nested For LOOPS

In this part you will learn: 1. For LOOP 2. Nested For LOOP 3. More on conditional statements 4. C syntax 5. Showing output In this tutorial I will teach you how to make different shapes using For Loop and * . Making different shapes with * may sound something like very unimportant but trust me making these shapes provide a very good understanding of the loop. What is a NESTED LOOP ? Sometimes we need two loops to execute a statement.