Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. WAP to create frame within an applet with two button with an event.
2. WAP to design menu with sub menu options as circle, line, box when any one
option clicked the respective image will draw.
3. WAP in applet to check which key is pressed.
Q1. [0.4x10=4]
CSS Question
Question Set 1
Q1.
font-size: 1em;
line-height: 1.5em;
font-weight: bold;
font-style: italic;
font-varient: small-caps;
font-family: verdana,serif
and
Q2.
if you put two class together it will work or not
Ex. <p class="text side">...</p>
Q3.
What is the CSS border default value.
Q4.
What it will do the following css structure
margin-top: 3.5em !important; margin-top: 2em
Q5.
What is the benefit of using the following css structure?
<h1><img src="widget-image.gif" alt="Buy widgets" /></h1>
Q6.
What is the benefit of using the following css structure?
<h1>Buy widgets</h1>
Q7.
What it will do?
h1 {
background: url(widget-image.gif) no-repeat;
}
h1 span {
position: absolute;
left:-2000px
}
Q8.
How you can use the following CSS.
#box
{
width: 100px;
border: 5px;
padding: 20px;
}
Q9.
What is the alternative use of above CSS structure
Q10.
If You write the following css structure what will be the effect.
#content {
width: 700px;
margin: 0 auto;
}
Q11.
What the following css structure
#container {
position: relative
}
Q12.
What do you mean by css positioning within a container.
Q13.
What will be the effect of the following css structure.
Body {
background: url(blue-image.gif) 0 0 repeat-y;
}
Q14.
What is CSS.
Q15.
What are the classification of CSS
Q16.
What is css inheritance.
Q17.
What meta tag you need to put in html header for inline style sheet.
Q18.
How you can change scrollbar properties.
Q19.
What is the use of div and span over css
Q20.
If you use both id selector and class selector together how it will work (not
separately).
6. \d = digit [0-9]
"p123g" =~ m/p\d\d\dg/ ==>
7. \w = letter or digit
"p123g" =~ m/\w\w\w\w\w/ ==>
8. i+ = one or more i's
"piiig" =~ m/pi+g/ ==>
9. matches iii
"piiig" =~ m/i+/ ==>
19. Matches and stops at first 'cat'; does not get to 'catcat' on the right
"cathatcatcat" =~ m/(c|a|t)+/ ==>
20. ? = optional
"12121x2121x2" =~ m/^(1x?2)+$/ ==>
25.
"PiIIg" =~ /pIiig/ ==>
"PiIIg" =~ /pIiig/i ==>
Question Set A
a $hello
b. $_test
c. $now_is_the_time_to_come_to_the_aid_of_the_party
d. $fries&gravy
e. $96tears
f. $tea_for_2
Question Set B
$num = <STDIN>;
chop ($num);
$x = "";
$x += "hello";
if ($x != "goodbye" | $x == "farewell") {
$result = $num eq 0 ? 43;
} else {
$result = ++$num++;
}
print("the result is $result\n");
8. What is wrong with the following program?
#!/usr/local/bin/perl
# program which prints the next five numbers after the
# number typed in
$input = <STDIN>;
chop ($input);
$input = $input + 1; # start with the next number;
$input = $terminate + 5; # we want to loop five times
until ($input == $terminate) {
print ("The next number is ", $terminate, "\n");
9. Write a Perl program that uses the while statement to print out the first 10
numbers (1-10) in ascending order.
10. Write a Perl program that reads in two numbers and does the following:
o It prints Error: can't divide by zero if the second number is 0.
o If the first number is 0 or the second number is 1, it just prints the
first number (because no division is necessary).
o In all other cases, it divides the first number by the second number
and prints the result.
11. Write a Perl program that uses the until statement to print out the first 10
numbers in descending order (10-1).
12. Write a program that uses the << operator to print out the first 16 powers
of 2.
13. Write a program that reads data into an array and writes the array.
14. Write a program that prints every element of an array.
15. Write a program that uses list ranges to print a list of numbers.
16. Write a program that copies an array and compares the elements of the
two arrays.
17. Insert a number and find out the factorial of it.
18. insert a name from keyboard and check with an array element wheather it
matches or not.
19. In the above problem check for more than one keyword.
20. Using hash array check the input value (keyboard) matches with the hash
value or not.
1. Write a subroutine that takes two arguments, adds them together, and returns the
result.
2. Write a subroutine that counts the number of occurrences of the letter t in a string
(which is passed to the subroutine). The subroutine must return the number of
occurrences.
3. Write a subroutine that takes two filenames as its arguments and returns a nonzero
value if the two files have identical contents. Return 0 if the files differ.
4. Write a subroutine that simulates the roll of a die (that is, it generates a random
number between 1 and 10) and returns the number.
5. Write a subroutine that uses recursion to print a list in reverse order. The
subroutine must recursively call itself to print the entire list; each invocation must
print one word of the list. (Assume that the first call to your subroutine passes the
value 0 and the list to be printed.)
Servlet Question
JDBC Question