Solve them and explain also | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Solve them and explain also

1) j = i++; Provide i = 11 And j =10 2) in c language, TC++ compiler it provide i= i++; Provide value of i 11

30th Apr 2021, 4:34 AM
Abhishek
Abhishek - avatar
7 Answers
+ 5
Basically I++ here ++ is an increment operator which increase by 1 value One request pls don't use TC compiler as it is 30 year old compiler. Please try to use vscode, dev++ or code blocks etc for compilation. In your ex: J = i++ ; First I value is 11 then after increment it will be 12 . So now j value is 12 Now here it is given j = 10; In above ex it should be j-- .here -- means decrease by one value Then your answer be 10 . Hope it is clear to you now
30th Apr 2021, 4:47 AM
Aysha
Aysha - avatar
+ 4
abhishek bairwa int k=10,j; j= k++; System.out.println(j); System.out.println(k); Phle line me k ka value hai 10 aur j ko sirf declare kiya gaya hai iska matlab hai j ki value 0 hai Dusri line me k++ iska matlab hai phle value ko likna hai then uski value ko bada na hai 1 number se aur answer ko j variable me store karna hai Akhir me print karna hai sabi values ko print statement use karke Ex System. out.println() ; Answer ya output hai 10 //phle k ki value ko use karna 11// then 1 no se value ko bada na Asha hai k samajh me agaya hoga
30th Apr 2021, 9:51 AM
Aysha
Aysha - avatar
+ 3
Simply run in java compiler of this app. You will get the output.
30th Apr 2021, 5:31 AM
Aysha
Aysha - avatar
+ 2
Ok 🅰🅹 🅐🅝🅐🅝🅣 Sir I will explain him in hindi
30th Apr 2021, 9:32 AM
Aysha
Aysha - avatar
+ 1
Aysha Explain in Hindi. He doesn't know English well.
30th Apr 2021, 6:12 AM
A͢J
A͢J - avatar
0
int i =10; System.out.printf("%d,%d,%d",i++,i,++i); Output in Java ?? Explanation in Hindi or English
30th Apr 2021, 12:56 PM
Abhishek
Abhishek - avatar
- 1
int k=10,j; j= k++; System.out.println(j); System.out.println(k); Output in Java ??
30th Apr 2021, 5:17 AM
Abhishek
Abhishek - avatar