C Program to Check Whether a Number Is Prime

Prime number is a natural number (integer) greater than 1 that doesn’t have any positive divisor other than 1 and itself. Here is the program to check whether a number is prime or not. #include <stdio.h> int CheckPrime(int n) { int i = 0; for(i=2; i<=n/2; ++i) { if(n%i == 0) { return 0; } … Continue reading “C Program to Check Whether a Number Is Prime”

How to Print 1 to 100 without using Loop in C programming?

Probably we all know how to write C program to print 1 to 100 using loop. We can have a quick look of the code snippet. void print_numbers() { int i = 0; for (i = 0; i < 100; i++) { printf(“ %d”, i+1); } } If we want to use while loop: void … Continue reading “How to Print 1 to 100 without using Loop in C programming?”

Disable Automatic App Update on Android Smartphones

By default automatic App update is enabled in most of the Android smartphones. Whenever you connect your Android phone to Wi-Fi network, download automatically starts for updates of all apps on your phone. This is good feature to have in general but some time it is  distraction of work also. For example, you connected your … Continue reading “Disable Automatic App Update on Android Smartphones”

How to Disable Ping Response in Linux

Ping is a software utility primarily used by the network administrators to check the reachability of a network host (target) from another host (source). It is also used to check the round trip delay, the time taken a network packet to travel from source to target and back. The round trip delay indicates the health … Continue reading “How to Disable Ping Response in Linux”

How to Re-Indent C Code Using Notepad++

Indentation is very important for readability and manageability of code, especially, if the size of code base fairly big. Badly indented code is very difficult to understand or maintain. Good developers always maintain proper indentation but many times we get codes from internet or other sources which are not properly indented, many times they are … Continue reading “How to Re-Indent C Code Using Notepad++”

0
0
1
9
2
0