What is SQL ?

Updated on 12-Dec-2021 20:35:18
SQL stands for Structured Query Language. It is the primary language to interact with databases. With the help of SQL, we can extract data from a database, modify this data and also update it whenever there is a requirement. This query language is evergreen and is widely used across industries. For example, if a company has records of all the details of their employees in the database. With the help of SQL, all of this data can be queried to find out valuable insights in a short span of time... Read More

Write C program to find Exponent Power Series

Updated on 12-Dec-2021 20:35:06
Program : A program to evaluate the power series x2 x3 xn ex = 1 + x + --- + --- + ..... + ---- 2! 3! n! , 0 < x < 1 It uses if……else to test the accuracy. The power series contains the recurrence relationship of the type Tn = Tn-1 (---) for n > 1 T1 = x for n = 1 T0 = 1 If Tn-1 (usually known as previous term) is known, then Tn (known as present term) can be easily found by multiplying the previous ter... Read More

Advertisements

Updated on 16-oct-2001 12:00:00

Write a ‘C’ Program to compute the sum of all elements stored in an array using pointers

Updated on 12-Dec-2021 20:35:39
C Program to compute sum of the array elements using pointers Program : #include <stdio.h> #include <conio.h> void main() { int numArray[10]; int i, sum = 0; int *ptr; printf("\nEnter 10 elements : "); for (i = 0; i < 10; i++) scanf("%d", &numArray[i]); ptr = numArray; /* a=&a[0] */ for (i = 0; i < 10; i++) { sum = sum + *ptr; ptr++; } printf("The sum of array elements : %d", sum); } Outpu... Read More

How to check the type of triangle using C

Updated on 12-Dec-2021 17:04:29
C Program to check the type of triangle #include <stdio.h> #include <math.h> int main() { int side1, side2, side3; //Change values accordingly side1 = 5; side2 = 4; side3 = 3; if ((side1 + side2 > side3 && side1 + side3 > side2 && side2 + side3 > side1) && (side1 > 0 && side2 > 0 && side3 > 0)) { if (side1 == side2 && side2 == side3) { printf("Equilateral... Read More

How to Calculate Area of Circle using C Programming

Updated on 12-Dec-2021 13:17:37
C Program to Calculate Area of Circle Shape : Circle Formula : Π * r * r Definition : 1. Ellipse in which the two axes are of equal length 2. Plane curve generated by one point moving at a constant distance from a fixed point 3. You can compute the area of a Circle if you know its radius. Program : #include <stdio.h> int main() { float radius, area; printf("\nEnter the radius of Circle : "); scanf("%d", &radius); area = 3.14 * radius * radius;... Read More

Advertisements

Updated on 16-oct-2001 12:00:00

How to Calculate Area of Rectangle using C Program

Updated on 12-Dec-2021 13:06:07
C Program to Calculate Area of Rectangle Shape : Rectangle formula : area = l * b Definition : 1. A plane figure with 4 sides and 4 right angles and having Equal Opposite Sides 2. Adjucent sides makes an angle of 90 degree 3. You can compute the area of a Rectangle if you know its length and breadth Program :  #include <stdio.h> #include <conio.h> int main() { int length, breadth, area; printf("\nEnter the Length of Rectangle : "); scanf("%d", &... Read More

How to Calculate Area of Right angle Triangle using C Language

Updated on 12-Dec-2021 12:57:49
C Program to Calculate Area of Right angle Triangle Definition : Triangle having one angle of measure 90 degree is called Right angle Triangle. Sides of Triangle are : base , height , hypotenuse. You can compute the area of a Tr. if you know its any two sides. Program :  #include <stdio.h> int main() { int base, height; float area; printf("\nEnter the base of Right Angle Triangle : "); scanf("%d", &base); printf("\nEnter the heigh... Read More

Advertisements

Updated on 16-oct-2001 12:00:00

How to Find Area of Scalene Triangle using C

Updated on 12-Dec-2021 12:44:54
C Program to Find Area of Scalene Triangle : #include <stdio.h> #include <math.h> int main() { int s1, s2, angle; float area; printf("\nEnter Side1 : "); scanf("%d", &s1); printf("\nEnter Side2 : "); scanf("%d", &s2); printf("\nEnter included angle : "); scanf("%d", &angle); area = (s1 * s2 * sin((M_PI / 180) * angle)) / 2; printf("\nArea of Scalene Triangle : %f", area); return (0); } Output : Ente... Read More

How to Calculate Area of Equilatral Triangle using C Language

Updated on 12-Dec-2021 9:59:37
#include<stdio.h> #include<math.h> int main() { int side; float area, r_4; r_4 = sqrt(3) / 4; printf("\nEnter the Length of Side : "); scanf("%d", &side); area = r_4 * side * side; printf("\nArea of Equilateral Triangle : %f", area); return (0); } Output : Enter the Length of Side : 5 Area of Equilateral Triangle : 10.82 Properties of Equilateral Triangle : Equilateral triangle is a triangle in which all three sides a... Read More
Advertisements

ads