Skip to content

Category Archives: C Programs

Given an integer N, the task is to check if the given number N is even or odd. If it is found to be even,… Read More
Given an array arr[] consisting of N integers, the task is to find the largest element in the given array using Dynamic Memory Allocation. Examples:… Read More
Given two strings s1 and s2, the task is to write C program compare the two strings without using strcmp() function. If string are equal… Read More
In C, %n is a special format specifier. In the case of printf() function the %n assign the number of characters printed by printf(). When… Read More
Pointers in C programming language is a variable which is used to store the memory address of another variable. We can pass pointers to the… Read More
Given a number N, the task is to write C program to check if the given number is perfect cube or not. Examples: Input: N… Read More
In this article, we will discuss how to change the cursor style on the screen in C. Approach: The idea is to use the setcursortype()… Read More
Given string str, the task is to write C program to remove leading space from the given string. Examples : Input: str = ”  … Read More
The purpose of the exit() function is to terminate the execution of a program. The “return 0”(or EXIT_SUCCESS) implies that the code has executed successfully… Read More
Given a number N, the task is to write C program to count the number of zeros from 0 to N. Examples: Input: N =… Read More
Unspecified Behavior terminology is used by users of C and C++. It is defined as Annex-J of C11 standard. Let us learn about this terminology… Read More
Given two numbers A and B, the task is to find the sum of the given two numbers.Examples:  Input: A = 5, B = 6 Output:… Read More
The floating-point numbers serve as rough approximations of mathematical real numbers. They do not represent the exact value. For this reason, we compare the arithmetic… Read More
Given a number N, the task is to find the number of days corresponding to each month where 1 is January, 2 is February, 3… Read More
The task is to write a C/C++ program to draw a command-line progress bar. Approach: To create a progress bar the idea is to use… Read More