PROGRAMMING IN JAVA Assignment 2 | NPTEL | Answer with Explanation

Test Your Java Fundamentals with a Challenging MCQ Assignment on “ Java Programming Elements” Sharpen your core Java skills with this engaging multiple-choice quiz (MCQ).

Following is a program given for this question.

public class Question{
public static void main(String[] args){
int[] x = {222, 210, 012};
for(int i = 0; i < x.length; i++){
System.out.print(x[i] + "");
}
}
}

What will be the output of the above program?

a. 22221010
b. 12222101
c. 22101010
d. 22221012

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Computer Bits Daily
Computer Bits Daily

Written by Computer Bits Daily

Learning Computer skills and Computer technology by learning and sharing

No responses yet

Write a response