Menu
Question Index
...

What will be the output of the following program?

public class Hikes {

    public static void main(String[] args) {
        int dailywage = 4;
        int number_of_days = 5;
        int salary = number_of_days++ * --dailywage * dailywage++ * number_of_days--;
        salary =- dailywage;
        System.out.println(dailywage + " " + number_of_days + " " + salary);
    }
}


4 5 316
4 5 176
4 5 266
Some other output or compilation error

Doubts

Problems

Topic: Increment And Decrement Operators In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App