- 5

What is the output of the following code?

int a = 11; int b = 12; int c = 40; switch (a) { case 40: System.out.println(b); break; default: System.out.println(c); }

9th Jan 2017, 8:15 AM
Mohammed Rishad
Mohammed Rishad - avatar
12 Réponses
+ 1
40
12th Feb 2020, 3:20 PM
Ricardo Monteiro Horta
Ricardo Monteiro Horta - avatar
+ 1
40
28th Jun 2022, 10:00 PM
Opanuga Stephen
Opanuga Stephen - avatar
0
40
9th Jan 2017, 2:20 PM
Nawaj Shareef
Nawaj Shareef - avatar
0
what is the output of this code?? #include <iostream> using namespace std; int fun(int a,int b=1,int c=2) {return(a+b+c); } int main() {cout<<fun(12, ,2); return 0; }
20th Nov 2019, 11:39 AM
Esraa Elmagraby
Esraa Elmagraby - avatar
0
#include <iostream> #include <> int main() { ofstream fileObj("myfile.txt"); (fileObj.()) { fileObj << "I work with files"; fileObj.close(); } else { cout << "Error" << endl; } }
13th Dec 2019, 2:05 PM
fatma
0
40
18th Jan 2020, 2:22 AM
Pullaiyannan.M
Pullaiyannan.M - avatar
0
11
11th Sep 2020, 3:10 PM
Abdulsamad Z Madallha
Abdulsamad Z Madallha - avatar
0
int x = 10; switch (*x*) { case 10: System.out.println("A"); break; *case* 20: System.out.println("B"); break; } Answers are marked in asterisks **
22nd Dec 2021, 4:58 AM
Priyansu Chakraborty
Priyansu Chakraborty - avatar
0
11
28th Sep 2022, 8:56 PM
Edgar Ignacio García Castillo
Edgar Ignacio García Castillo - avatar
- 1
40
9th Jan 2017, 9:23 AM
DFX
DFX - avatar
- 1
40
24th Sep 2017, 9:21 AM
Naveenraaj
Naveenraaj - avatar
- 4
a
1st Aug 2018, 6:50 AM
Luis Carlo Edama Cunanan
Luis Carlo Edama Cunanan - avatar