Showing posts from May, 2022

Swap two elements in an array with code

CODE:  #include <stdio.h> int main () {     int i1 , i2 ;     int n ;             printf ( "Enter the size of…

Turing machine for 2's complement

Let's consider a binary number  01011000 Now, we will first find out the 1's complement of 01011000 then add 1 to…

For loop in c

To understand for loop, we will go through an example. Suppose you want to print numbers from 1 to 30, then, you have to write a…

How was the universe created

Introduction: Scientists have long been trying to understand the creation of the universe. What started it all? Is there a God?…

An Introduction to Gravitation in Physics

Download  An Introduction to Gravitation in Physics The gravitational force (also known as gravitation) is one of the four funda…

Calculate average in c programming using arrays

Explanation:  We will solve this problem using array. Because, without array we need to take user input for n numbers again and …

How to implement array in C

#include<stdio.h> int main() {   printf("Enter the size of array : \n");   int n;   scanf("%d",&n)…

Load More
That is All