wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CODING COMPITITION LEVEL-I

Total questions: 50

Worksheet time: 21mins

Name
Class
Date
1.

The correct sequence of HTML tags for starting a webpage is -

a)

              Head, Title, HTML, body

b)

HTML, Body, Title, Head

c)

HTML, Head, Title, Body

d)

HTML, Head, Title, Body

2.

Which of the following tag is used for inserting the largest heading in HTML?

a)

<h3>

b)

<h1>

c)

<h5>

d)

<h6>

3.

Which character is used to represent the closing of a tag in HTML?

a)

\

b)

!

c)

/

d)

.

4.

Output of 33 == 33.0

a)

False

b)

True

c)

33

d)

  None of the above

5.

Which of the following is the container for <tr>, <th>, and <td> ?

a)

<data>

b)

<table>

c)

<group>

d)

All of the above

6.

HTML tags are enclosed in-

a)

# and #

b)

{ and }

c)

! and ?

d)

< and >

7.

Which of the following is the correct extension of the python file?

a)

.python

b)

.pl

c)

.py

d)

.p

8.

How we can swap two numbers a=10, b=20 in python without using third variable?

a)

a=b  b=a

b)

a,b = b,a

c)

both a and b

d)

b=a a=b

9.

select the option in below python code:

s=0

for d in range(0 ,5 , 0.1):

            s+ = d

            print(s)

a)

Syntax error

b)

Type error

c)

Runtime error

d)

Both b and c

10.

Special symbol in python to add comments

a)

$

b)

//

c)

/*.....*/

d)

#

11.

C Language is a successor to which language?

a)

FORTRAN

b)

D Language

c)

BASIC

d)

B Language

12.

What is the way to suddenly come out of or Quit any Loop in C Language.?

a)

continue; statement

b)

break; statement

c)

leave; statement

d)

quit; statement

13.

Identify wrong C Keywords list given below

a)

auto, double, int, struct

b)

break, else, long, switch

c)

case, enum, register, typedef

d)

char, extern, intern, return

14.

Choose a right C Statement.

a)

Loops or Repetition block executes a group of statements repeatedly.

b)

Loop is usually executed as long as a condition is met.

c)

Loops usually take advantage of Loop Counter

d)

All the above.

15.

Choose facts about continue; statement is C Language.

a)

continue; is used to take the execution control to next iteration or sequence

b)

continue; statement causes the statements below it to skip for execution

c)

continue; is usually accompanied by IF statement.

d)

 All the above.

16.

Which loop is faster in C Language?

a)

for

b)

while

c)

do while

d)

All work at same speed

17.

C is a which level language?

a)

Low Level

b)

High Level

c)

Middle Level

d)

None

18.

What are C ASCII character ranges.?

a)

A to Z = 65 to 91

b)

a to z = 97 to 122

c)

0 to 9 = 48 to 57

d)

All

19.

The library function used to find the last occurrence of a character in a string is

a)

strnstr()

b)

laststr()

c)

strrchr()

d)

strstr()

20.

The keyword used to transfer control from a function back to the calling function is

a)

switch

b)

goto

c)

go back

d)

return

21.

If the two strings are identical, then strcmp() function returns

a)

-1

b)

1

c)

0

d)

2

22.

Point out the error in the program

f(int a, int b){

    int a;

    a = 20;

    return a;}

a)

Missing parenthesis in return statement

b)

The function should be defined as int f(int a, int b)

c)

Redeclaration of a

d)

None of above

23.

To print out a and b given below, which of the following printf() statement will you use?

#include<stdio.h>

 

float a=3.14;

double b=3.14;

a)

printf("%f %lf", a, b);

b)

printf("%Lf %f", a, b);

c)

printf("%Lf %Lf", a, b);

d)

printf("%f %Lf", a, b);

24.

The keyword used to transfer control from a function back to the calling function is

a)

switch

b)

goto

c)

go back

d)

return

25.

What will be the output of the program?

#include<stdio.h>

void fun(int*, int*);

int main()

{

inti=5, j=2;

    fun(&i, &j);

printf("%d, %d", i, j);

return0;

}

void fun(int i, int j)

{

    i = i**i;

    j = j**j;

}

a)

5, 2

b)

10, 4

c)

2, 5

d)

25, 4

26.

How many times the program will print "GIETU" ?

#include<stdio.h> 

int main()

{

printf("GIETU");

    main();

return0;

}

a)

Infinite times

b)

32767 times

c)

65535 times

d)

Till stack overflows

27.

Which of the following function is more appropriate for reading in a multi-word string?

a)

printf();

b)

scanf();

c)

gets();

d)

puts();

28.

Which of the following are C preprocessors?

a)

#ifdef

b)

#define

c)

#endif

d)

all of the mentioned

29.

finding and solving errors in the source code is

a)

desk checking

b)

debugging 

c)

decoding

d)

testing

30.

……language is not an object oriented programming language…

a)

visual basic

b)

c

c)

c++

d)

java

31.

What is the name of the method used to start a thread execution?

a)

init();

b)

start();

c)

run();

d)

resume();

32.

Which statement is true given the following in JAVA code?

double d = math.random();

a)

0.0 < d <= 1.0

b)

0.0 <= d < 1.0

c)

Compilation fail

d)

Cannot say.

33.

A programming paradigm includes:

a)

Problem solving

b)

Program language design

c)

Problem solving and program language design

d)

None of the above

34.

This paradigm tells how to do something rather than what to do:

a)

object-oriented

b)

procedural

c)

scripting

d)

functional

35.

This paradigm is relatively simple:

a)

object-oriented

b)

scripting

c)

procedural

d)

functional

36.

Scala is part of the: ____?

a)

object-oriented

b)

aspect-oriented

c)

pascal

d)

imperative

37.

This type paradigm example includes both functional and logic programming:

a)

Fortran

b)

C

c)

Pascal

d)

SQL

38.

This programming paradigm facilitates sharing across programs:

a)

object-oriented

b)

aspect-oriented

c)

scripting

d)

procedural

39.

This paradigm should not be used by itself but with other paradigms:

a)

object-oriented

b)

aspect-oriented

c)

scripting

d)

functional

40.

There are _____ compilation process stages in c language.

a)

4

b)

5

c)

6

d)

7

41.

What difference does the 5th generation computer have from other generation computers?

a)

Technological advancement

b)

Scientific code

c)

Object Oriented Programming

d)

All of the above

42.

The Programs which are as permanent as hardware and stored in ROM is known as

a)

Hardware

b)

Software

c)

Firmware

d)

ROMware

43.

Which of the these is the functionality of ‘Encapsulation’?

a)

Binds together code and data

b)

Using single interface for general class of actions.

c)

Reduce Complexity

d)

All of the mentioned

44.

Data types are differed on basis of

a)

way of storage

b)

type of operations

c)

type of operators used

d)

All of the mentioned

45.

Which statement is used to select a default database?

a)

USE

b)

CREATE

c)

DROP

d)

SCHEMA

46.

Which statement is used to see the definition for an existing database?

a)

SHOW CREATE DATABASE

b)

SHOW DATABASE

c)

SHOW CREATE

d)

SHOW CREATE DATABASE TABLE

47.

The statement to change the table name is __________

a)

CHANGE

b)

CHANGENAME

c)

CHANGENM

d)

RENAME

48.

which of the following function returns current date and time in mysql ?

a)

CURDATE()

b)

NOW()

c)

CURTIME()

d)

DATE()

49.

Which of the following clauses is used to display information that match a given pattern in mysql?

a)

LIKE

b)

WHERE

c)

IS

d)

SAME

50.

In the following SQL code, InnoDB is __________

CREATE TABLE student ( name CHAR(30), student_id INT, PRIMARY KEY (student_id) ) ENGINE = InnoDB;

a)

database name

b)

table name

c)

reference engine

d)

storage engine