Create a free account on Computer Sir Ki Class and unlock access to valuable learning resources.
Exam Paper Downloads: After registering and logging in, you can download exam question papers in PDF format to practice and prepare for your exams.
Student Support: Get assistance with your doubts, queries, and questions related to your studies. Our support is here to help you understand topics and resolve your learning difficulties.
Register today and make your exam preparation easier and more effective!
Give the output of the following code:
String A =”26″, B=”100″;
String D=A+B+”200″;
int x= Integer.parseInt(A);
int y = Integer.parseInt(B);
int d = x+y;
System.out.println(“Result 1 = “+D);
System.out.println(“Result 2 = ” +d);
Answer:
String A= g26, B= g100 ;
A = g26, B = g100
String D=A+B+ g200;
D = g26 + g100 + g200 = 26100200
int x= Integer.parseInt(A);
x = Integer.parseInt(g26) = 26
int y=Integer.parseInt(B);
y= Integer.parseInt(B) = Integer.parseInt(g100); = 100
int d=x+y;
d = 26 + 100 = 126
System.out.println(gResult 1=h +D);
Result 1=26100200
1 for(int i=5, d=5; i<=5; i++) {
2 d = d * 2;
3 System.out.println(d);
4 }
1 String s= "Today is Test";
2 System.out.println(s.indexOf('T'));
3 System.out.println(s.substring(0,7)+ " "+ "Holiday");
1 String A= "26", B= "100" ;
2 String D=A+B+ "200";
3 int x= Integer.parseInt(A);
4 int y=Integer.parseInt(B);
5 int d=x+y;
6 System.out.println("Result 1=" +D);
7 System.out.println("Result 2="+d);
System.out.println(gResult 2=h+d);
Result 2=126
Ans.
1 Result 1=26100200
2 Result 2=126
C. Sir| Created: 15-Apr-2019 | Updated: 15-Apr-2019|ICSE2017