0% found this document useful (0 votes)
6 views5 pages

Twishadwivedi Pic1

The document outlines an experiment for a C programming course at K. J. Somaiya School of Engineering, focusing on data types and operators. The experiment includes computing the area and circumference of a circle and converting distances between cities into various units. It concludes with a review of basic data types, operator precedence, and the importance of input/output functions in C programming.

Uploaded by

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

Twishadwivedi Pic1

The document outlines an experiment for a C programming course at K. J. Somaiya School of Engineering, focusing on data types and operators. The experiment includes computing the area and circumference of a circle and converting distances between cities into various units. It concludes with a review of basic data types, operator precedence, and the importance of input/output functions in C programming.

Uploaded by

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

K. J.

Somaiya School of Engineering, Mumbai-77


(Somaiya Vidyavihar University)
Department of Science and Humanities

Course Name: Programming in C Semester: II


Date of Performance: 09/ 01 / 2025 DIV/ Batch No: P3-3 EXTC
Student Name: TWISHA DWIVEDI Roll No: 57

Experiment No: 1
Title: Working with data types and operators

Aim and Objective of the Experiment:


Write a program in C to demonstrate the use of data types and operators

COs to be achieved:
CO1: Understand the concepts of data types and operators

Theory:
Area and Circumference of Circle. Ask the user to enter the value of the radius of a circle. Put the
values in the formula for finding the area of a circle and the circumference of a circle and print the
outcome for area of a circle and the circumference of a circle.

Input of the distance between two cities in kilometers and converting them into meters, centimeters,
feet, and inches.
Ex- If there are two cities "Gwalior" and "Delhi", their distance is 500 kilometers, after converting
the distance from a kilometer, the distance value will be: 500000 meters, 1640420 feet, 19685050
inches, and 50000000 centimeters.

Problem Statements:
Write a program for the following
1. Compute the area and circumference of a circle.

2. Read the distance between two cities in KM and print that distance in meters, feet, inches,
and centimeters.

Code :

Programming in C Semester: II Academic Year: 2024-25


K. J. Somaiya School of Engineering, Mumbai-77
(Somaiya Vidyavihar University)
Department of Science and Humanities

1.Compute the area and circumference of a circle.

2.Read the distance between two cities in KM and print that distance in meters, feet, inches, and
centimeters.

Programming in C Semester: II Academic Year: 2024-25


K. J. Somaiya School of Engineering, Mumbai-77
(Somaiya Vidyavihar University)
Department of Science and Humanities

Output:

1.Compute the area and circumference of a circle.

2.Read the distance between two cities in KM and print that distance in meters, feet, inches, and
centimeters.

Programming in C Semester: II Academic Year: 2024-25


K. J. Somaiya School of Engineering, Mumbai-77
(Somaiya Vidyavihar University)
Department of Science and Humanities

Post Lab Subjective/Objective type Questions:


1.What are the basic data types in C?
ANS- The primary data types include
 Integer Types- which represent integer number
 Float Type- which represents singe precession floating point number
 Double Type -which represents double precession floating point number
 Character Type -which represents single character
 Void type-which represents empty type
2.Write a table for Operator Precedence and Associativity

Programming in C Semester: II Academic Year: 2024-25


K. J. Somaiya School of Engineering, Mumbai-77
(Somaiya Vidyavihar University)
Department of Science and Humanities

Conclusion:
In this lesson we learned about the basics of C programming and learned the syntax and meaning for
printf and scanf , different input output functions
We also learned about the basic data types and how to use them along with their order of precedence
In addition to this we learned to code a basic program in the C language
Understood the concept of datatypes and operators

Signature of faculty in charge with Date:

Programming in C Semester: II Academic Year: 2024-25

You might also like