YouTube Icon

Interview Questions.

Top 100+ Tool Command Language Interview Questions And Answers - Jun 02, 2020

fluid

Top 100+ Tool Command Language Interview Questions And Answers

Question 1. What Is Tcl?

Answer :

Tcl (Tool Command Language) is a very powerful however smooth to study dynamic programming language, suitable for a completely extensive variety of makes use of, consisting of internet and laptop programs, networking, management, trying out and lots of extra. Open source and business-pleasant, Tcl is a mature but evolving language this is honestly cross platform (windows,all flavors of linux,macintosh), without problems deployed and rather extensible.

Question 2. How Tcl Works?

Answer :

Tcl takes the Argument as a document and try to examine the file. TCL stores the file in reminiscence and reads the record Line by way of Line and try to validate/assemble. TCL provides the output and launch the reminiscence.

Perl Scripting Interview Questions
Question 3. How To Increment Eacl Element In A List? Eg: Incrlist 1 2 3 =>2 3 4?

Answer :

// it really works like incrlist five 6 7 =>> 6 7 eight

proc incrlist args 

set s zero

foreach s $args 

incr s 1

puts $s

//for list

proc incrlist listing 

set s 0

foreach s $list 

incr s 1

places $s

Question four. How To Run A Package In Tcl ?

Answer :

source <package_name> (or) package deal require <name>

Perl Scripting Tutorial
Question five. How Increment A Character? For Example, I Give A And I Should Get B?

Answer :

L set individual “a”

set incremented_char [layout %c [expr [scan $character %c]+1]] puts “Character earlier than incrementing ‘$character’ : After incrementing ‘$incremented_char'”.

HTML Interview Questions
Question 6. How To Extract “facts” From “ccccccccaaabbbbaaaabbinformationabcaaaaaabbbbbbbccbb” In Tcl Using A Single Command?

Answer :

% set

a “ccccccccaaabbbbaaaabbinformationabcaaaaaabbbbbbbccbb”

ccccccccaaabbbbaaaabbinformationabcaaaaaabbbbbbbccbb

% set b [string trimleft $a “abc”]

informationabcaaaaaabbbbbbbccbb

% set c [string trimright $b “abc”]

information

(OR)

% set output [string trimright [string trimleft

$a “abc”] “abc”]

information

%

1.Value

Question 7. How To Swap 30 & forty In Ip Address 192.30.Forty.1 Using Tcl Script?

Answer :

There are 3 answers:

set a 192.30.40.1

set b [ string range $a 3 4 ]

set c [ string range $a 6 7 ]

set d [ string replace $a 3 4 $c ]

set e [ string replace $d 6 7 $b]

places $e

(OR)

set a 192.30.Forty.1

set b [ split $a .]

set u [lindex $b 0]

set v [lindex $b 3]

set x [lindex $b 1]

set y [lindex $b 2]

set z [join “$u $y $x $v” .]

puts $z

(OR)

set ip 192.30.40.1

regexp ([0-9]+.)([0-9]+.)([0-9]+.)([0-9]+) $ip fit 1st 2nd third 4th

append new_ip $1st $third $2nd $4th

places $new_ip

HTML Tutorial Java Script Interview Questions
Question eight. How Do You Find The Length Of A String Without Using String Length Command In Tcl?

Answer :

set str “lenghtofthisstring”

set len 0

set list1 [ split $str “” ]

foreach fee $list1 

incr len

places $len

Question 9. How To Check Whether A String Is Palindrome Or Not Using Tcl Script?

Answer :

Code for the above pseudo code.Check if it really works!!!!!

Receives stdin a

set len [ string length $a ]

set n [ expr $len/2 ]

for  set i zero   $i < $n   incr i 1  

set b [ string index $a $i ]

set c [ expr $len – 1 – $i ]

set d [ string index $a $c ]

if $b != $d 

puts “now not a palindrome”

exit

puts “Palindrome”

T-SQL Interview Questions
Question 10. Set Ip Address As 10.30.20.1 Write A Script To Replace The 30 With forty?

Answer :

here you can do this in more than one approaches:

regsub 30 $information 40 a places $a this can provide you with the changed string.

String replace $data three 4 forty this also will give you the changed.

Java Script Tutorial




CFG