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

Assignment One

The document outlines a comprehensive curriculum on problem solving with computers, focusing on the C programming language. It covers topics such as algorithms, data types, input/output functions, operators, and expressions, along with practical programming exercises. Each unit includes theoretical explanations and programming tasks to reinforce learning.

Uploaded by

amishact4
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)
11 views2 pages

Assignment One

The document outlines a comprehensive curriculum on problem solving with computers, focusing on the C programming language. It covers topics such as algorithms, data types, input/output functions, operators, and expressions, along with practical programming exercises. Each unit includes theoretical explanations and programming tasks to reinforce learning.

Uploaded by

amishact4
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

Unit 1: Problem solving with computers

1. What do you mean by Problem Solving? Explain how c-language is used to solve
problems?
2. What is an algorithm? What are the similarities between algorithm and flowchart?
3. Explain history of C language briefly.
4. Explain the structure of C-program with an example.
5. Write an algorithm and draw a flowchart to determine whether the number is positive,
negative, zero, odd, even or prime number.
6. Write an algorithm and draw a flowchart to find the real roots of quadratic equation
ax2+bx+c=0.

Unit 2: Elements of C-language

1. What are keywords? Give any 10 examples of keywords.


2. Define identifier. Explain the rules for defining valid identifiers.
3. What do you mean by escape sequence? Give example.
4. Explain delimeters with examples.
5. What are data types? Explain different data types with their characteristics?
6. Explain preprocessor directives, symbolic constant with example.
7. What do you mean by variable? Explain variable declaration with proper syntax.
8. What is constant? Explain different constants used in c-language.
9. Write a program to find the area of a triangle when base and height are given.
10. Write a program to find the area of a circle using define macros.
11. Write a program to find the real roots of a quadratic equation.
12. Write a program to find the semi-perimeter and area of triangle when three sides are
given.
13. Write a program to find the area between two concentric circles.
14. Write a program to find the area and volume of a sphere.
15. Write a program to find the square root and square of any integer using math.h headerfile.

Unit 3: Input and Output

1. Differentiate between formatted and unformatted I/O functions.


2. What are the commonly used I/O (scanf and printf) functions in C? Write general form of
each.
3. What is the difference between getch() and getche() functions? Explain with an example.
4. Explain the program using getchar() and putchar() functions?
5. Explain why getchar(), putchar(), getch(), getche(), putch(), etc are called unformatted
functions.
6. Write a program to read data char, int, float, double, long, double from the keyboard and
display it on screen using suitable functions.
Unit 4: Operators and Expressions

1. What do you mean by operators? Explain arithmetic operators.


2. Explain unary operator, binary operator and ternary operator with example.
3. What are the types of C operators? Compare unary and binary operators.
4. What is pre-increment and post-increment? Explain with example.
5. What do you mean by logical operators? Explain.
6. How relational operators differ from logical operators?
7. Explain logical and bitwise logical operators with example.
8. What do you mean by ternary operator? Explain with example.
9. What is type conversion? Explain implicit and explicit type conversion.
10. Define operator precedence and associativity with example.
11. What do you mean by bitwise shift operator? Explain left shift and right shift operators
with example.
12. What is automatic type conversion? List the automatic type conversion rule in C.
13. Find the value of the following expressions:
int a=8,b=5;
float x=0.005, y=0.01;
i. 2*((a/5)+(4*(b-3))%(a+b-2));
ii. (x<y>&&(a>0)||(b<4);
iii. (a>b)?a:b;

You might also like