Page not found
Search results
C++ class example program
C++ class program example: In our program, we create a class named programming with one variable and two ...
devyog - 08/01/2018 - 20:44
Bitwise operators in C
... (1). We will perform operations on individual bits. C program #include <stdio.h> main ( ) { int ... 0 ; } Left shift operator example program #include <stdio.h> main ( ) { int ...
devyog - 23/11/2019 - 11:40
C program to swap two numbers
C program to swap two numbers with and without using third variable , using ... XOR operator. Swapping means interchanging. If the program has two variables a and b where a = 4 and b = 5, after swapping them, a = 5, b = 4. In the first C program, we use a temporary variable to swap two numbers. ...
devyog - 19/11/2019 - 09:06
sqrt in C
... Function sqrt in C returns the square root of a number. To use it, include the "math.h" header file in the program. Declaration: double sqrt(double); Square root in C using sqrt ...
devyog - 04/11/2020 - 13:23
Sum of n natural numbers in C
C program to find the sum of n natural numbers using the formula and a for ... Sum of first n natural numbers = n*(n+1)/2. C program to find sum of n natural numbers #include <stdio.h> ... int n , sum ; printf ( "Enter a number \n " ) ; scanf ( "%d" , & n ) ; ...
devyog - 04/11/2020 - 14:18
drawpoly function in c
... int num, int *polypoints ); num indicates (n+1) number of points where n is the number of vertices in a polygon, polypoints ... last point(320, 150) in array is same as first. See the program below and then its output, it will further clear your understanding. ...
devyog - 08/01/2018 - 20:55
Delay function in C
... Delay in C: delay function is used to suspend execution of a program for a particular time. Declaration: void delay(unsigned int); Here unsigned int is the number of milliseconds (remember 1 second = 1000 milliseconds). To use delay ...
devyog - 29/09/2018 - 13:46
assert in C
... that is used to check specific conditions at runtime (when a program is under execution) and is very useful while debugging a program. ... is displayed on the screen specifying the filename, the line number, the function name, the condition that does not hold (see image below). ...
devyog - 02/10/2020 - 16:14
getmaxcolor function
... color value for current graphics mode and driver. Total number of colors available for current graphics mode and driver are ( ... starts from zero. Declaration: int getmaxcolor(); C program of getmaxcolor #include<graphics.h> #include<conio.h> ...
devyog - 08/01/2018 - 20:55
String length in C
C program to find length of a string, for example, the length of the string "C ... To find it, we can use strlen function of "string.h." C program to find length of a string without using strlen function , recursion ... || []).push({}); Download String length program. Output of program: String length in C without strlen ...
devyog - 22/10/2020 - 21:08