For-Students-CSN101 Lab File Objectives-Final-Total 22-For Students
For-Students-CSN101 Lab File Objectives-Final-Total 22-For Students
of
BACHELOR OF TECHNOLOGY
In
Session 2023-24
SCHOOL OF COMPUTING
DIT UNIVERSITY, DEHRADUN
(State Private University through State Legislature Act No. 10 of 2013 of Uttarakhand and approved by UGC)
Mussoorie Diversion Road, Dehradun, Uttarakhand - 248009, India.
August-December 2024
INDEX
CONDUCTION INSTRUCTOR’s
S.NO. NAME OF THE EXPERIMENTS
DATE SIGNATURE
Write a C program to demonstrate the programming
environment in C. Explain each basic entity required
1
to build a program, including the compilation and run
process.
Write the C programs to demonstrate the use of the
following operators:
• Arithmetic Operators
• Relational Operators
• Logical Operators
2
• Shorthand Assignment
• Unary Operators
• Conditional Operators
• Bitwise Operators
• Comma Operator
Write a C program to convert a floating-point number
3
into the corresponding integer and vice versa.
Write a C program to convert degrees Fahrenheit into
4
degrees Celsius.
Write a C program to print the ASCII value of a
5
character.
Write a C program to find the greatest of three
6
numbers using && and if-else-if.
Write a C program to show the use of isalpha(),
7
isdigit(), isprint() and isspace() functions with if.
Write a C program to enter numbers from 1 to 7 and
8 display the corresponding day of the week using a
switch case statement.
Write a C program to calculate the sum of numbers
9
from m to n using a while loop.
Write a C program to display the square and cube of
10
first n natural numbers using the do-while loop.
Write the C programs to print the following patterns
using the for loop:
(i) (ii)
* 1
11
** 12
*** 123
**** 1234
***** 12345
Write the programs to demonstrate the use of break,
12
continue, and goto statements.
Experiment-01
Code:
//FIRST C PROGRAM
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();t
/*Printing address of
DIT University*/
printf("DIT University\n");
printf("Mussorie Diversion Road\n");
printf("Makkawala, Dehardun\n");
printf("Uttarakhand\t248009\tINDIA");
getch();
}
Output:
Experiment -02
Code:
Output:
Experiment-03
Objective:
Output