Introduction to Decision Control Structure in C

C Programming Tutorial

Decision !!! we all need to alter our actions in the face of changing circumstances. If the weather is fine, then I will go for a stroll. If the highway is busy I would take a diversion. If the pitch takes spin, we would win the match. If she says no, I would look elsewhere. … Read more

write a C program for Conversion of Temperature from Fahrenheit to Centigrade

C Programming Tutorial

Problem Statement: Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a c program to convert this temperature into Centigrade degrees. Answer: /* Conversion of Temperature from Fahrenheit to Centigrade */ #include <stdio.h> #include <conio.h> main() { float fr, cent; clrscr(); print(“\n Enter the temperature in Fahrenheit:”); scanf(“%f”, &fr); cent=5.0/9.0*(fr-32); printf(“\n … Read more

Control Instructions in C

C Programming Tutorial

As the name suggests the ‘Control Instructions’ enable us to specify the order in which the various instructions in a program are to be executed by the computer. In other words the control instructions determine the ‘flow of control’ in a program. There are four types of control instructions in C. They are: Sequence Control … Read more