0% found this document useful (0 votes)
8 views

Assignment-1 Flowchart&algorithm

Uploaded by

jakkapallirohith
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Assignment-1 Flowchart&algorithm

Uploaded by

jakkapallirohith
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Course : Programming for Problem solving using C

Branch : I B.Tech-CSE
Topic : Algorithm,flowchart and data types.
Assignment : 01

1. Define idenitifier. What are the rules for naming identifier?

2. Why do we need variables?

3. what is the difference between algorithm and pseudocode?

4. Give the binary representaion of integer 1791 and floating point number
6
1.00001001010101010 * 2 .

5. What are the primary data types and mention the size of memory allocated for each data
type (with reference to gcc compiler)?

6. Give the abbrevation for ASCII.

7. Write algorithm and flowchart for the following problems


a) Calculate the distance between two points (x1,y1) and (x2,y2).
b) Check whether the given integer is a prime or not.
c) Check whether the given integer is a lucky number or not . Lucky number means ,
consider the indian bike/car/any vehicle number(of last 4 digits) and add digits of the
number recursively till the number lies between 1 to 9. If the number is 9, then it is a
lucky number otherwise, it is not a lucky number.
Example : 1623 = 1+6+2+3 = 12 = 1+2 = 3.
1623 is not lucky number.
1980 = 1+9+8+0 = 18 = 1+9 = 9 .
1980 is a lucky number.

8. Consider the following statements and write what it specifies to the compiler?
float price;
int x;
double mkt_value;

You might also like