wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

java

Total questions: 8

Worksheet time: 2hrs 0mins

Name
Class
Date
1.

C programming was originally developed by

a)

Nicolas Wirth

b)

Dinnesh Ritchie

c)

Bjarne Stroustrup

d)

Dennis Ritchie

2.

Which programming language is more faster among these?

a)

Java

b)

PHP

c)

C

d)

Visual Basic

3.

Which statement can print \n on the screen?

a)

printf("\\n");

b)

printf("n\");

c)

printf("n");

d)

printf('\n');

4.

What is output of following program


#include<stdio.h>


main()

{

int a[] = {2,1};


printf("%d", *a);

}

a)

0

b)

1

c)

2

d)

Compile Error

5.

What is a pointer?

a)

A - A keyword used to create variables

b)

B - A variable used to store address of an instruction

c)

C - A variable used to store address of other variable

d)

D - A variable used to store address of a structure

Show Answer

6.

To print a double value which format specifier can be used?

a)

%L

b)

%lf

c)

%Lf

d)

None of the above

7.

Which is valid C expression?

a)

int my_num = 100,000

b)

int my_num = 100000

c)

int my num = 1000

d)

int $my_num = 10000

8.

Which statement can print \n on the screen?

a)

printf("\\n");

b)

printf("n\");

c)

printf("n");

d)

printf('\n');