Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a function to check if a number (17) is prime.

Medium

Problem Statement

Write a function to check if a number (17) is prime.

Sample Input

17

Sample Output

17 is a prime number

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
#include <stdio.h> int isPrime(int num) { // Your code here } int main() { int num = 17; if (isPrime(num)) { printf("%d is a prime number\n", num); } else { printf("%d is not a prime number\n", num); } return 0; }
Log in or sign up to run or submit your code.Log inSign up
Input
17
Expected Output
17 is a prime number