Font size
WorksheetsGolang,PHP,Ruby,C#
Total questions: 40
Worksheet time: 26mins
What does PHP stand for?
Preprocessor Hypertext Page
Personal Home Page
Hypertext Transfer Protocol
PHP Hypertext Preprocessor
PHP is considered a server-side scripting language.
True
False
Maybe
I don't know
Which of the following extension is correct for PHP files?
.html
.opp
.php
.pxp
How do you start the PHP scripting block?
<php.....?>
<script .... script>
<?php.... ?php>
<?......?php>
Variables in PHP always begins with...
?
&
$
#
Which of the following is the correct syntax to start a multiple line comment in PHP?
#-----------#
/______/
/*--------*/
/------/*
$i = 1;
while ($i < 6) {
echo $i;
(a)
}
$txt = "W3Schools.com";
echo "I love (a) !";
$t = date("H");
if ($t < "10") {
echo "Have a good morning!";
} elseif ($t < "20") {
(a) "Have a good day!";
} else {
echo "Have a good night!";
}
$x = 5985;
var_dump( (a) ($x));
_________ is an interpreted, high-level, general-purpose programming language which supports multiple programming paradigms.
Ruby Language
Java Language
Html
R Language
In Ruby a ______ refers to a value of either true or false
Array
Boolean
Numbers
Loop
Ruby language founder?
Two words.
(a)
In ruby,
a = 19
b = 4
(a) a + b
Extension that will run Ruby Language
.rv
.r
.com
.rb
Ruby ____ is a collection of key-value pairs.
Numbers
Hash
Loop
Boolean
Write the command to get installed Ruby version in your system.
(a)
Ruby program to illustrate 'while' loop
x = 4
while x >= 1
x = x - 1
(a)
Ruby _____are ordered, integer-indexed collections of any object.
Hash
Numbers
Arrays
Loop
A _______ object in Ruby holds and manipulates an arbitrary sequence of one or more bytes, typically representing characters that represent human language
String
Boolean
Array
Hash
What is a correct syntax to output "Hello World" in C#?
C# is an alias of C++
True
False
The most common method to output something in C# is ....................
WriteLine()
cout
cin
How do you insert COMMENTS in C# code?
# This is a comment
// this a comment
/* This ia a comment
The types of Variables who stores floating point numbers is ..............
int
char
double
bool
Which data type is used to create a variable that should store text?
String
Int
Double
Char
How do you create a variable with the numeric value 5?
num x = 5;
int x = 5;
x = 5;
double x = 5;
How do you create a variable with the floating number 2.8?
int x = 2.8;
int x = 2.8D;
byte x = 2.8;
double x = 2.8D;
The character must be surrounded by ......................
single quotes
Double quotes
Angle brackets
Square brackets
public class Program{
public static int addition(int a, int b){
return (a+b);
}
public static void Main(){
int a,b;
int sum;
Console.Write("Enter first number: ");
a = ____________(Console.ReadLine());
Console.Write("Enter second number: ");
b = ____________(Console.ReadLine());
sum = addition(a,b);
Console.WriteLine("Sum is: " + sum);
}
(a)
Golang was developed at
Microsoft
Golang is an Open-source programming language
Yes
No
Maybe
In which year GOlang named as "Lang of the year"
2019
2016
2017
2018
Time duration for converting programming code into Machine code is
Compile Time
Run Time
import "fmt"
func main() {
var number1, number2, number3 int
number1 = 99
number2 = 81
number3 = number1 + number2
fmt. (a) ("The addition of ", number1, " and ", number2, " is \n ", number3, "\n(Addition of two integers within the function)")
}
import "fmt"
func addNumber(number1, number2 int) int {
return number1 + number2
}
func main() {
var number1, number2, number3 int
number1 = 18
number2 = 9
number3 = (a) (number1, number2)
// printing the results
fmt.Println("The addition of ", number1, " and ", number2, " is \n", number3, "\n(adding two integers outside the function)")
}
Created by Robert Griesemer, Rob Pike, and (a) , Go (also known as Golang) is an open-source language that first began development in 2007.
import ("fmt")
func main() {
myslice1 := []int{}
fmt.Println(len( (a) ))
}
what is the variable for Go Constant.
(a)
import ("fmt")
func main() {
(a) arr1 = [3]int{1,2,3}
arr2 := [5]int{4,5,6,7,8}
fmt.Println(arr1)
fmt.Println(arr2)
}
