Linux Practical Questions
Linux Practical Questions
Perform the Commands in Linux Shell the note the output in a file
date
date -u
date --date="2/02/2010"
date --date="yesterday"
date --date="tomorrow"
date "+%D"
date "+%Y-%m-%d"
date "+%Y/%m/%d"
5. Write a C program to read the age of a candidate and determine whether he is eligible to cast
his/her own vote.
read num
case $num in
[0-9])
;;
[1-9][1-9])
;;
[1-9][1-9][1-9])
;;
*)
;;
Esac
7. If a number is input through the keyboard, WASS to calculate sum of its digits. (for example if the
number is 369 then the output should be 3+6+9 = 18)
9. Two numbers are entered through the keyboard. WAP to find the value of one number raised to
the power of another.
1 0
0 1 0
1 0 1 0
0 1 0 1 0
9.