+ 1

How many times would the following loop execute? Char a = 'a' While (a>'a' && a<='z') a++;

28th Mar 2023, 4:30 PM
Subhasmita Dash
Subhasmita Dash - avatar
11 Answers
+ 4
No output Your condition a> 'a' never gonna true
28th Mar 2023, 4:34 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 4
Subhasmita Dash , i can not see that you have started with any sololearn tutorial to learn. (you have registerd for sololearn just 1 day ago) > select a programming language you wanted to learn. > start with the basic tutorial by reading and learning the lessons. all of the things you have asked are explained in the tutorials. > also practice as much as you can afford > if you get stuck somewhere you can post a question here.
28th Mar 2023, 6:20 PM
Lothar
Lothar - avatar
+ 2
Because you have defined char data type which have value 'a' And a == 'a' // true but a>'a' false value of a is 'a' It's not greater nor smaller and && will be true if your both case satisfy first and second condition
28th Mar 2023, 4:37 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Explain it .
28th Mar 2023, 4:30 PM
Subhasmita Dash
Subhasmita Dash - avatar
0
Why ?
28th Mar 2023, 4:34 PM
Subhasmita Dash
Subhasmita Dash - avatar
0
Explain why it is false here
28th Mar 2023, 4:36 PM
Subhasmita Dash
Subhasmita Dash - avatar
0
Ya
28th Mar 2023, 4:38 PM
Subhasmita Dash
Subhasmita Dash - avatar
0
hy
28th Mar 2023, 5:03 PM
Anshuman Sharma
Anshuman Sharma - avatar
0
how 2 file join
28th Mar 2023, 5:03 PM
Anshuman Sharma
Anshuman Sharma - avatar