0% found this document useful (0 votes)
16 views2 pages

Program 2

The document contains a C program that displays personal information such as name, father’s name, class, semester, and date of birth. It includes a source code section, an algorithm outlining the steps to achieve the task, and a flow chart representing the process visually. The program aims to demonstrate the use of comments and descriptive variable names for readability.

Uploaded by

Devanshu Jaat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Program 2

The document contains a C program that displays personal information such as name, father’s name, class, semester, and date of birth. It includes a source code section, an algorithm outlining the steps to achieve the task, and a flow chart representing the process visually. The program aims to demonstrate the use of comments and descriptive variable names for readability.

Uploaded by

Devanshu Jaat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

DEVANSHU 1324035

4. SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
char name[50]=”Devanshu”;
char fname[30]=”Mr Yash Pal”;
char course[10]=”BCA”;
char dob[20]=”12/10/2007”;
int rollno=35;
int sem=1;

printf=(“/nName: %s”, name);


printf=(“/nRollNo: %d”, rollno);
printf=(“/nFather name: %s”, fname);
printf=(“/nClass: %s”, course);
printf=(“/nSemester: %d”, sem);
printf=(“/nDOB: %s”, dob);
getch();
}

5. OUTPUT:
DEVANSHU 1324035

PROGRAM NO.2
1. STATEMENT:
Write a program to display your Name, Father Name, Class,
Semester and DOB using the given instructions a) Write
comments to make your program readable b) Use descriptive
variables in your program.

2. ALGORITHM:
Step1: Start
Step2: Declare variables Name, Roll No, Semester, Father
Name, Class and DOB.
Step3: Initialize the variables
Step4: Print the output
Step5: Stop

3. FLOW CHART:

START

Declare Variables

Initialize Values of Variables

Output Information

STOP

You might also like