0% found this document useful (0 votes)
21 views1 page

Assignment1 - Introduction To C Programming

The document outlines an assignment for the course 'Structured Programming Language Sessional' focusing on C programming. It includes objectives such as applying basic C structures, using printf and scanf functions, and writing well-commented code. The assignment consists of various programming tasks aimed at developing skills in handling data types, input/output, and formatting.

Uploaded by

rahmanmdriad380
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)
21 views1 page

Assignment1 - Introduction To C Programming

The document outlines an assignment for the course 'Structured Programming Language Sessional' focusing on C programming. It includes objectives such as applying basic C structures, using printf and scanf functions, and writing well-commented code. The assignment consists of various programming tasks aimed at developing skills in handling data types, input/output, and formatting.

Uploaded by

rahmanmdriad380
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

Course Title: Structured Programming Language Sessional

Course Code: CSE 1202


Assignment Topic: Introduction to C Programming
This assignment focuses on the practical application of the basic structure of C programming. The
primary objective is to develop simple programs using common data types, escape sequences,
comments, and format specifiers. The assignment will also cover the use of printf and scanf functions
in structured programming. The problems are designed to assess your understanding and ability to use
these functions to solve basic programming tasks.
Learning Outcomes:
By the end of this assignment, you will be able to:
 Apply the basic structure of C programming to solve simple problems.
 Develop C programs using printf and scanf functions effectively.
 Understand and use common data types, escape sequences, and format specifiers.
 Write well-commented code to improve readability.

1. Write a C program to display the message: Hello World!.


2. Write a C program to display your full name, student ID, and university name, each on a new line.
3. Write a C program to display your full name, ID and university name in three lines using a printf
function.
4. Create a C program that will display the following lines, ensuring that the formatting and line
breaks are exactly as shown:
“Life is a dream, realize it.
Life is a challenge, meet it.
Life is beauty, admire it.”
5. Write a C program that takes an integer input from the user and displays it.
6. Write a C program that takes a float input from the user and displays it.
7. Write a C program that takes a single character input from the user and displays it.
8. Write a C program that takes two integer inputs using the scanf function and calculates their sum.
9. Write a C program that takes two floating-point numbers as inputs using the scanf function and
calculates their product.
10. Design a C program that takes an input temperature in Celsius using the scanf function and converts
it to Fahrenheit. Use the formula:
Fahrenheit = (Celsius × 9/5) + 32
11. Develop a C program that takes two characters as input from the user and displays both characters
along with their respective ASCII values. Use escape sequences to format the output.
Example Output:
If the user enters the characters A and B, the output will be:
You entered the characters: 'A' and 'B'
The ASCII value of 'A' is: 65
The ASCII value of 'B' is: 66
12. Write a C program that demonstrates the use of single-line (//) and multi-line (/* */) comments.
…………………………………….

1 Prof. Bulbul Ahamed, Dept. of CSE, Sonargaon University [Link]@[Link]

You might also like