1.What are the different ways to initialize a variable. How
to differentiate global and local variables, explain it
through a simple tcl program.
2.Create a list of week days and print the first and last
character of each day using foreach command
3.Can you write a small program to verify the given input is
file or directory.Before checking, just ensure that the
file/dir exists or not in the given path. If the given
input is a file, findout the size and verify that the file
has all read ,write and execute permission.
Answer Posted / basavaraj
1.
a. Initializing using
set x 10
lappend y 13
b. Initializing using out put of an expression
set z [expr $x + $y ]
c . Initializing using a list
set m [list $x $y $z]
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers