1. C PROGRAMMING LAB | Check Now

C PROGRAMMING LAB – 01] Familiarization with programming environment, the concept of naming the program files, storing, compilation, execution, and debugging. Taking any simple C- code


This is the first program of the VTU C programming laboratory 18CSL17/27.

This program gives a basic understanding of algorithms, code design, and code execution.

First, let us know the symbols used in the Algorithm.

Algorithm Symbols

The below table contains the symbols which are used in drawing the flow chart.

C PROGRAMMING FLOW CHART SYMBOLS

Simple Example -Algorithm with Flow Chart

Simple c program-

#include<stdio.h> 
{ 
  int l, b, area, peri;  	
  printf("Enter the  length and the breadth\n");  
  scanf("%d%d", &l, &b);  	
  area = l * b;  	
  peri = 2 * (l + b);  	
  printf("The area is %d\n", area); 
  printf("The perimeter is %d\n', peri); 
}  

C PROGRAMMING -Output

Enter the length and the breadth

See also  Design and Analysis of Algorithm Lab 1 | Read Now

5

4

The ara is 20

The perimeter is 18

The below table contains a simple algorithm with a flow chart.

C PROGRAMMING SIMPLE EXAMPLE

Leave a Reply

Your email address will not be published. Required fields are marked *

WhatsApp Icon Join For Job Alerts