NATIONAL INSTITUTE OF TECHNOLOGY SIKKIM
Ravangla Campus
Barfung Block, Ravangla Sub Division, South Sikkim-737139
B.Tech 2nd Year III Semester Laboratory Experiments – 2018
Experiments using Pipe
1. Input 8 numbers and display/output the result by 2X2 matrix manipulation.
2. Collect the Ethernet address in hexadecimal and generate the 48 bit pattern of the same.
3. Input two numbers, through the child process and find their product and quotient in the parent process. If there
is any error during the processing, display the error.
4. Enter two numbers from one end of the pipe and get the sum from the other end.
5. Enter/Input 10 numbers and display the numbers in ascending order.
6. Enter any hexadecimal number and display the equivalent decimal and binary numbers.
7. Input any word up to 10 alphabets and display the number of different alphabets appearing in the word e.g.
McGraw-Hill (Input), a = 1, c = 1, g = 1, h = 1, i = 1, l = 2, m = 1, r = 1, w = 1 (Output)
8. Input numbers 1 – 9 in any order and display the corresponding cardinality e.g. 2 (Input), Second (output)
9. Input temperature in ºC and display the temperature in ºF.
10. Input a salutation and name in English and display return salutation e.g. ‘Good Morning, Amrita’ (Input), ‘Good
Morning, Madame Amrita’ (output).
11. Enter two numbers (not consecutive) stating the range of numbers and display any two numbers randomly
within the range, e.g. 5, 9 (Input), 6, 8 OR 5, 8 OR 7, 9 OR any similar number pair (Output)
12. Input a complex number and display the corresponding complex conjugate, e.g. a+ib (Input), a-ib (output).
13. Enter a word and display the word in reverse order.
14. Enter a number, convert it into binary (8 bits), XOR it with 10101011 and display the number in decimal.
15. Input a set of 10 numbers and display mean and standard deviation for this set of input.
16. Input a set of angles, {A} e. g. 30º, 45º, 60º, 90º etc. and display the corresponding value for {sin A, cos A, tan
A}.
17. Input a set {Name, Weight, Height} and display the BMI of the person with name.
18. Input the number of days in a month (e.g. 28, 29, 30, 31) and list down the possible name(s) of the month.
1|Page