Strings in C language

string in c

Strings in ‘c’ are defined as a series of characters. The difference between a string and a string is that the string ends with a special character “”. Strings in c declaration: declaring a string is as simple as declaring a dimensional array. Below is the basic syntax for declaring a string. In the syntax … Read more

Introduction to C language

C language is a procedural programming language. It was originally developed by Dennis Ritchie in 1972. It was developed primarily as a system programming language for writing an operating system. The main features of the C language include low access to memory, a simple set of keywords and clean style, these features make the C … Read more

Write a program to read marks of a student from keyboard whether the student is pass or fail (using if else)

#include<stdio.h> int main() { int marks; printf(“n Enter Marks from 0-70 :”); scanf(“%d”,&marks); if(marks<23) { printf(“n Sorry ..! You are Fail”); } else { printf(“nCongratulation …! You are Pass”); } return 0; } /*54745756836*/

Write a C program to find that the accepted number is Negative, or Positive or Zero.

#include<stdio.h> int main() { int no; printf(“n Enter any number : “); scanf(“%d”,&no); if(no==0) { printf(“n Entered Number is Zero”); } else if(no>0) { printf(“n Entered Number is Positive”); } else { printf(“n Entered Number is Negative”); } return 0; } /*54745756836*/

Write a C program to find out distance travelled by the equation d = ut + at^2

#include<stdio.h> int main() {     float u,a,d;     int t;          printf(“nEnter the value of a : “);     scanf(“%f”,&a);     printf(“nEnter the value of u : “);     scanf(“%f”,&u);     printf(“nEnter the value of t : “);     scanf(“%d”,&t);     d = (u … Read more

Write a program to compute from centigrade to Fahrenheit

centigrade to Fahrenheit  formula (f=1.8*c +32) #include <stdio.h> int main()  {  float F,C;  printf(“Enter Temperature in Celsius : ” );  scanf(“%f”,&C);  F = (C * 1.8) + 32;  printf(“n %.2f Celsius = %.2f Fahrenheit”,C, F);  return 0; }   More C programs are here http://projugaadu.com/category/topics/c-language/ /*54745756836*/

Write a C program to enter a distance into kilometers to meter to convert, feet, inches, and centimeter.

//kilometers to meter#include <stdio.h> int main()  {  float km;  printf(“Enter Length in KiloMeter : “);  scanf(“%f”,&km);  printf(“n %.2f KM = %.2f Meters”,km,km*1000);  printf(“n %.2f KM = %.2f Feets”,km,km*3280.84);  printf(“n %.2f KM = %.2f Inches”,km,km*39370.08);  printf(“n %.2f KM = %.2f Centimeters”,km,km*1000*100);  return 0; } you can find more c programs and things here http://projugaadu.com/category/topics/c-language/ /*54745756836*/

Write a C program to swap two numbers

//swap two numbers#include <stdio.h> int main()  {  int a,b;  printf(“Enter Value of a :”);  scanf(“%d”,&a);  printf(“Enter Value of b :”);  scanf(“%d”,&b);  a=a+b;  b=a-b;  a=a-b;  printf(“nAfter Swapping Values a = %d b = %d”,a,b);  return 0; } You can get more c program here http://projugaadu.com/category/topics/c-language/ /*54745756836*/