Filter interviews by
I applied via Job Fair and was interviewed before Aug 2022. There were 2 interview rounds.
Using For Loop
Below is the C program to check prime numbers using for loop:
// C program to demonstrate whether
// a number is prime or not using
// for loop
#include
// Defining the function
int primenumber(int number)
{
int i;
// Condition for checking the
// given number is prime or
// not
for (i = 2; i <= number / 2; i++)
{
if (number % i != 0)
continue;
else
return 1;
}
return 0;
}
// Driver code
int main()
{
int num = 7, res = 0;
// Calling the function
res = primenumber(num);
if (res == 0)
printf("%d is a prime number", num);
else
printf("%d is not a prime number", num);
}
Output
7 is a prime number
A database is a collection of organized data that can be easily accessed, managed, and updated.
A database is used to store and organize data in a structured format.
It allows for efficient retrieval, insertion, and updating of data.
Examples of databases include MySQL, Oracle, and SQL Server.
Top trending discussions
posted on 13 May 2021
posted on 13 May 2021
based on 1 review
Rating in categories
Senior Project Manager
6
salaries
| ₹3 L/yr - ₹8 L/yr |
HR Recruiter
4
salaries
| ₹1.8 L/yr - ₹2 L/yr |
Data Entry Operator
4
salaries
| ₹2.5 L/yr - ₹12 L/yr |
HR Executive Recruiter
4
salaries
| ₹1.9 L/yr - ₹2.4 L/yr |
Computer Operator
3
salaries
| ₹2.2 L/yr - ₹4.5 L/yr |
Wintax Solution
e-Solutions
Anri Solutions HR Services
Crescendo Global