write program to illustrate console based IO exception
Answers
Answered by
2
1. Define the union named number with two variables n1 and n2.
2. Define the union variable x.
3. Take the value of two variables using dot operator(i.e. x.n1, x.n2) as input.
4. Print the values of two variables using dot operator as output.
Runtime Test Cases
Enter the value of n1: 10 Value of n1 = 10 Enter the value of n2: 50 Value of n2 = 50.000000
Sanfoundry Global Education & Learning Series – 1000 C Programs.
Here’s the list of Best Reference Books in C Programming, Data-Structures and Algorithms
If you wish to look at other example programs on Simple C Programs, go to Simple C Programs. If you wish to look at programming examples on all topics of C, go to C Programming Examples.
« Prev Page - C Program to Cyclically Permute the Elements of an Array
» Next Page - C Program to Delete the Specified Integer from an Array
2. Define the union variable x.
3. Take the value of two variables using dot operator(i.e. x.n1, x.n2) as input.
4. Print the values of two variables using dot operator as output.
Runtime Test Cases
Enter the value of n1: 10 Value of n1 = 10 Enter the value of n2: 50 Value of n2 = 50.000000
Sanfoundry Global Education & Learning Series – 1000 C Programs.
Here’s the list of Best Reference Books in C Programming, Data-Structures and Algorithms
If you wish to look at other example programs on Simple C Programs, go to Simple C Programs. If you wish to look at programming examples on all topics of C, go to C Programming Examples.
« Prev Page - C Program to Cyclically Permute the Elements of an Array
» Next Page - C Program to Delete the Specified Integer from an Array
Similar questions