0% found this document useful (0 votes)
65 views1 page

Quiz 3

This document is a quiz containing 5 multiple choice questions related to Java programming concepts. The quiz tests knowledge of data types, bitwise operators, variable assignments, nested for loops to populate an array, and access restrictions for private variables. It will be taken by a student named _________ with registration number ___________.

Uploaded by

rockin_ravi_vit
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views1 page

Quiz 3

This document is a quiz containing 5 multiple choice questions related to Java programming concepts. The quiz tests knowledge of data types, bitwise operators, variable assignments, nested for loops to populate an array, and access restrictions for private variables. It will be taken by a student named _________ with registration number ___________.

Uploaded by

rockin_ravi_vit
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

VIT UNIVERSITY

(ESTD. U/S 3 OF UGC ACT 1956)


SCHOOL OF INFORMATION TECHNOLOGY & ENGG
QUIZ I


Name : _________________________________ Reg No. ___________________
1. What is the size of chat data type in java

1. 32 bits
2. 8 bits
3. 16 bits
4. 64 bits

2. What is the value of Result

Result = 27 | 8;
1. 27
2. 35
3. 19
4. 8

3. Select the valid assignments


1. int i=(int) 16.2
2. byte b=(byte) (long) 16.2;
3. byte b=128;
4. float f=16.2;
5. byte b=(int) 16.2;

4.What will be the content of array variable table after execting the
following code
for(int i=0; i<3; i++)
for(int j=0; j<3; j++)
if(j==i)
table[i][j]=1;
else
table[i][j]=0;
1. 100 110 111
2. 001 010 100
3. 100 010 001
4. 000 000 000

5. What is the result of trying to compile and run this


public class AQuestion{
private int i = j;
private int j = 10;
public static void main(String args[]){
System.out.println((new AQuestion()).i);
}
}
1. Compiler error complaining about access restriction of private
variables of AQuestion.
2. Compiler error complaining about forward referencing.
3. No error - The output is 0;
4. No error - The output is 10;

You might also like