Program to convert decimal to binary Programming

C Program to Convert Decimal to Binary

  • January 24, 2021
  • 0 Comments

Write a c program to convert decimal number to binary number. /*Program to convert decimal to binary*/#include<stdio.h>#include<conio.h>int bin(int x);void main(){ int x,binary; printf(“Enter Decimal Number:”); scanf(“%d”,&x); binary=bin(x); printf(“The Binary number is %d”,binary);getch();}int bin(int x){ int q,r; if(x==0) return; q=x/2; r=x%2; bin(q); printf(“%d”,r);}

Programming

C – Find the Area of Triangle, Circle and Square Using Switch Case

  • January 24, 2021
  • 0 Comments

C Program to find the area of triangle, circle and square using switch case. #include<stdio.h>#include<conio.h>#include<math.h>void main(){ int choice; clrscr(); printf(“1. For are of triangle”); printf(“2. For area of circle”); printf(“3. For area of ractangle”); printf(“4. For are of square”); printf(” Enter your choice:n”); scanf(“%d”,choice); { case 1: { int b,h,a; printf(“Enter base and height:”); scanf(“%d%d”,&b,&h); […]

Dynamic Memory Allocation Programming

C – Dynamic Memory Allocation

  • January 8, 2021
  • 0 Comments

Let’s take an example of array declaration on C programming.   int z[25] It reserves memory space for 25 integer numbers, Sometimes, the problem arises with this declaration. If the user needs to work on more than 25 values the allocated memory will not be sufficient. Besides, if the user needs to work on less […]

Pointer Type Declaration Programming

C – Pointers Type Declaration

  • January 8, 2021
  • 0 Comments

Same way as other variables, we have to declare pointers before we use them. Pointer declarations are the same as other declarations. When pointers are declared, the keyword for declaration is int, char, etc. declares the type of the pointer variable. The pointer type specifies the type of the variable to which the pointer points. For […]

Pointer and Use of Pointer Programming

C – Pointer and Use of Pointer

  • January 8, 2021
  • 0 Comments

A pointer is a variable that stores the address of another variable. Pointers are much used in C, partly because they are sometimes the only way to express a computation, and partly because they usually lead to more compact and efficient code than that can be obtained in other ways. Pointers and arrays are closely […]

Array and Array Declaration Programming

C – Array and Array Declaration

  • January 8, 2021
  • 0 Comments

The array is the collection of similar data items that can be represented by a single variable name. The individual data items in an array are called elements. A data item is stored in memory in one or more adjacent storage locations depending upon its type. An array is also known as a series of […]

Recursive Function in C Programming Programming

C – Recursive Function in C Programming

  • January 8, 2021
  • 0 Comments

Recursive can be regarded as the ability of function defining an object in terms of a simpler case of itself. It is a process by which a function calls itself repeatedly until some specific condition has been satisfied. The problem must be written in recursive form. The problem statement must include a stopping condition. A […]

Function Definition and Function Types Programming

C – Function Definition and Function Types

  • January 8, 2021
  • 0 Comments

C program consists of one or more functions along with function main(). Functions are known as modules this will make a program to easy. In Every program the main() function should be placed, in every program library function like printf(). sqrt(). pow() etc. C Function easy to define and use. The function is one of […]

For, While, Do While and Infinite Loop Programming

C – For, While, Do While and Infinite Loop

  • January 8, 2021
  • 0 Comments

For Loop The for loop is one of the powerful loop and flexible loop which provides a more concise loop control structure. It is a pre-test or entry control loop similar to while loop. A program can also use a while loop instead of for loop. If loops are nested then the for loop is […]

Switch, Break and Continue Statement Programming

C – Switch, Break and Continue Statement

  • January 7, 2021
  • 0 Comments

Switch Statement The switch statement is also called the constant multiway conditional statement. The program encounter the situation to choose the option particular option from the many kind of statement. To solve this problem you can use if-else statement also but that is a bit complex than the switch statement. The general format of the […]