Monday, 13 December 2010

Flow chart for To construct a pyramid of numbers

Objective :

To construct a pyramid of numbers

Description:


In this program the we have to construct output in the pyramid shape manner







Output:

1.enter the number:
4


      0

      
 1 0 1


       2 1 0 1 2


3 2 1 0 1 2 3

                              
     4 3 2 1 0 1 2 3 4

      2.enter the number :3


                   0


1 0 1


2 1 0 1
 2

           3 2 1 0 1 2 3
Conclusion: The program is error free

VIVA QUESTIONS:

1)  What is the use of dot operator in structures ?
Ans: The use of dot(.) operator to access the members of a structure independently. The dot operator connects a member with the structure variable.
2)  Define unions ?

Ans: A union is a data type in c which allows the overlay of more than one variable in the same memory area.



c programs

No comments:

Post a Comment