Find second largest number in array in java
In this post, we will see how to find second highest number in array. Problem You need to find second
Read moreIn this post, we will see how to find second highest number in array. Problem You need to find second
Read moreIn this post, we will see how to calculate average marks in java. Problem Given the marks of n subject
Read moreIn this post, we will see how to find missing number from array or series of numbers. Problem You have
Read moreHere is the list of frequently asked basic C interview programs. Table of Contents1. Write a program to find an
Read moreHere is simple program to swap tow numbers without actually using temp variable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
#include int main() { int firstNum, secondNum; printf("Enter first number: "); scanf("%d", &firstNum); printf("Enter second number: "); scanf("%d",&secondNum); // Swapping two numbers without using temp variable firstNum = firstNum - secondNum; secondNum = firstNum + secondNum; firstNum = secondNum - firstNum; printf("\nAfter swapping, firstNum = %d\n", firstNum); printf("After swapping, secondNum = %d", secondNum); return 0; } |
Output: Enter first number: 12 Enter
Read moreIn this tutorial, we will see C program to check leap year. Leap year is the year which has 366
Read moreIn this tutorial, we will see how to calculate area of the circle when you get radius as input. You
Read moreIn this post, we will see differences Between Wait and Sleep in Java. Table of ContentsWait vs SleepSleep exampleWait exampleDifferences
Read moreQuestion can we call the run() method instead of start() to start a thread Answer No, you cannot. You need
Read moreOne of the most asked Java multi-threading interview questions is if we can have try without catch block in java.
Read more