About Me

My photo
Vijayapur, Karnataka, India
I am interested in Teaching.

Saturday 26 August 2017

Assignment 1: Programming in C and Data Structures

Dear student,
  You are hereby informed to answer the following questions by reading recommended books and given notes. Write the answers in your own technical sentences. You answers must contain some additional points rather than given points in my notes. (Read--Understand--Re write)

1. Define algorithm. Give one examples.(3m)
Definition=1 m, Explanation=1m Two Examples=1m

2. Define flowchart. Give one example.(3m)
Definition=1 m, Explanation=1m Two Examples=1m

3. Write algorithm and draw flowchart to find simple interest.(2+2=4m)

4. Write algorithm and draw flowchart to find area and circumference of a circle.(2+2=4m)

5. What is pseudocode? Give any three examples. (5m)
Definition=1 m, Explanation=1m Three Examples=3m

6. Discuss "Structure of C Program" with programming example.(10m)
Definition=1m Structure=2m Explanation of all elements=5X1=5m Programming exmaple=2m

7. What are C-tokens? List and explain in brief.(8m)
Definition=1m List=1m Explanation=6 x 1=6m

8. What are datatypes? List and discuss in brief with range of values supported by them.(8m)

Definition=1m List=1m Explanation with range of values =1x5
9. Write c program to find largest of two numbers using conditional operator (?:) (5m)

10. Write c program to find largest of three numbers using conditional operator (?:) (5m)

11. Write c program to find roots of a quadratic equation. (10 m)

12. Write c program to check, whether the year is leap year or not leap year. (5m)

13. Write c program to check whether the number N is PALINDROME or not.

14. Write c program to swap two values using temporary variable.(3m)

15. Write c program to swap two values without using temporary variable.(3m)

16. Solve questions from Question Papers. (10m)

17. What are formatted I/O functions? Explain with syntax and examples.
Definition=1m
Definition of scanf()=1m Syntax=1m Examples=1m
Definition of printf()=1m Syntax=1m Examples=1m

18. What is precedence and associativity of operator? Give example. (5m)
Definition=1+1 2m
Examples=2m

19. Discuss the following operators with examples. (15m)
Arithmetic, Relational, Logical, Assignment, Increment/decrement, bitwise and special operators.

20. What is type conversion?Discuss different types with examples.









No comments:

GCD of two numbers and its application...

The greatest common divisor (gcd) of two numbers is the largest positive integer that divides both numbers without leaving a remainder. The ...