Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

TCL ASSIGNMENT-1

1. What are the identifier rules in TCL language?


2. Write a program to generate a bill total of 4 items.
3. Write a program to add 3 numbers.
4. What are ternary operators?
5. What is the meaning of === operator?
6. Write a program to find if the given number is a prime number or not.
7. Write a program to find if the given number is an integer or a floating value.
8. Write a program to find if the given number is even or odd.
9. Write a program to find if the given number is multiple of 9 or not.
10. Write a program to find the greatest number of 3 inputs.
11. Write a program to arrange the given 3 inputs in (i) Ascending order (ii) Descending
order.
12. Write a program to list out all the prime numbers up to 100 using for loop.
13. Write a program to list out all the odd numbers from 0 to 100 using while loop.
14. Write an example program to explain do-while loop.

TCL ASSIGNMENT-2
1. Write an example program to explain command line arguments.
2. Write all the assignment-1 questions using command line arguments.
3. Write all the assignment-1 questions using procedure format.
4. Write a program to find if the entered number or string is a palindrome or not.
5. Write a program to print mathematical tables from 1 to 10.
6. Write a program to print i x j th element from a text file when i and j are given as
inputs.

TCL ASSIGNMENT-3
1. Upgrade all the questions such that the outputs are written into a file.
2. Write a program to write answers of all the previous questions into a single file by
appending it.
3. Source file:

NAME SUBJECT MARKS

Sita Maths 100


Ram Maths 99
Laxman Maths 80
Sita Science 98
Ram Science 99
Laxman Science 88

i. Print the 2nd column of the source file.


ii. Write a script to print MARKS column.
iii. Write a script to print Maths subject marks of all the students.
iv. Write a script to print Sitas marks in all subjects.
v. Write a script to print Ramas marks in Maths.
vi. Write a script to count the number of students and subjects.
vii. Write a script to print the name of the person who have got maximum marks in
each subject and also print the marks .
viii. Write a script to print the total marks of each student.
ix. Write a script to arrange the names of students in the ascending order of their
subject wise marks.
x. Write a script to replace Science word with social.
xi. Write a program to print 5th row 1st column element.

You might also like