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

Assignment-1 (PSUC) Sep-Dec2024 Batch

This document outlines the assignment for CS 1002 Problem Solving Using Computers for B.Tech first-year students, detailing tasks to be completed by November 7, 2024. The assignment includes drawing a block diagram of Von Neumann architecture, writing multiple C programs for various tasks, and explaining programming concepts such as storage classes and type casting. Students are required to submit handwritten work and will receive zero marks for copied assignments.

Uploaded by

fevehi7390
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)
17 views1 page

Assignment-1 (PSUC) Sep-Dec2024 Batch

This document outlines the assignment for CS 1002 Problem Solving Using Computers for B.Tech first-year students, detailing tasks to be completed by November 7, 2024. The assignment includes drawing a block diagram of Von Neumann architecture, writing multiple C programs for various tasks, and explaining programming concepts such as storage classes and type casting. Students are required to submit handwritten work and will receive zero marks for copied assignments.

Uploaded by

fevehi7390
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/ 1

CS 1002 Problem Solving Using Computers

B.Tech (First Year), Semester I,


Session September 2024 – January 2025
Assignment-I
Date of Floating: 26/10/2024. Date of Submission: on/before 7th November 2024

Note: Kindly submit in handwritten only. If assignment found to be copy, then zero marks will
be awarded.
1. Draw a block diagram of Von Neuman architecture computer, with its major
components showing the transfer of data amongst its units. What is meant by stored
program concept?
2. Write a C program that performs the following tasks sequentially.

#include <stdio.h>
int main()
{
/*
Declare a variable named ‘temperature’ of type ‘float’.
Read the value of ‘temperature’ from user.
Prints the following messages based upon the value of ‘temperature’
(i) Prints “Freezing Weather” if ‘temperature is less than 0
(ii) Prints “Very Cold Weather” if 0 <= temperature <10
(iii) Prints “Cold Weather” if 10 <= temperature <20
(iv) prints “Normal Weather” if temperature >= 20
*/
}// End of Main
3. The length of three sides are taken as input. Write a C program to find whether a
triangle can be formed or not. If not display “This Triangle is NOT possible.” If the
triangle can be formed then check whether the triangle formed is equilateral,
isosceles, scalene or a right-angled triangle. (If it is a right-angled triangle then only
print Right-angle triangle do not print it as Scalene Triangle).
4. Write a C program and flowchart to find the maximum (minimum) among three
numbers and use it to find the maximum (minimum) among nine numbers.
5. Write a C program that returns a letter grade based on a quiz score. The input will be
the integer score from a ten-point quiz. The letter grades are assigned by:
9-10 “A”, 7-8 “B”, 5-6 “C”, 3-4“D”<3“F” using:
(a) If-else statements
(b) Switch Case statements
6. Explore the results of logical operators for the following below expressions, on declaration(s)
int a = 11, b = 7, c = 12, result:
(a) result = (a == b) && (c > b)
(b) result = (a == b) && (c < b)
(c) result = (a == b) || (c < b)
(d) result = (a != b) || (c < b)
(e) result = !(a != b)
(f) result = !(a == b)
(g) result=(a==10 + 15 && c < 10)
7. Explain the concept of storage classes in programming and write a program that
demonstrates the use of at least three different storage classes.
8. Write a program to calculate an amount of a telephone bill for the following criteria. (Without
Loop-switch case)
Calls Charge per call (Rs.)
1-150 0
151-250 .9
251-400 1.2
401 onwards 1.5

9. Define and Differentiate Among: (i) Formatted vs. Non-Formatted functions in C


(ii) Implicit vs. Explicit Type Casting

You might also like