Вы находитесь на странице: 1из 1

Exercises

1. Define the following terms:


(a)
Programming
(b) Program
(c) Programmer
(d) Machine language
(e) High level language
(f) Problem Analysis
(g) Debugging
(h) Coding
(i) Algorithm
(j) Flowchart
(k) Syntax error
(l) Logic error
2. Write variable declaration statement for each of the following:
(a) scanf( %d , &bil);
(b) scanf( %f , &income_tax);
(c) scanf( %c , &color_code);
(d) printf( %.2f , price);
(e) printf( Your name is %s , name);
(f) printf( You owe me %lf , your_debt);
3.
Write input statements to get the detail of one subject which contains s
ubject name,
subject code, subject credit hour and subject coordinator. Use a
ppropriate data type
for each data.
4.

Use the diagram below to write the output of the following code.
int a = 1234;
float f = 1234.56789
char c = X

5.
Write a program to express a given number of seconds in terms of hours, minutes
and seconds and output the result.
Starting from the following declarations
int a=2,b=3,c;
float x=5.0,y;
Predict the outcome of the operations
y=a*b;
c=a*b;
y=a/b;
c=a/b;
y=a/b*x;
c=a/b*x;
y=a*x/b;
c=a*x/b;

Вам также может понравиться