List of C programming Basic Input, Output, if else, Ternary Operator based Programs.

C program to print "Hello World!" / First C program.This is our first program in C language; this program will print “Hello World” on the screen, it is implemented using simple method as well as using c language user defined function.C program to find subtraction of two integer number.In this C program, we are going to … Continue reading List of C programming Basic Input, Output, if else, Ternary Operator based Programs.

Chapter 6 Programming Exercise [ANSI C] Part-1

Problem 6.1:  Given a number, write a program using while loop to reverse the digits of the number.For example ,the number  12345 should be written as  54321. Solution: #include <stdio.h> int main() {     int n;     printf("enter your number to revice\n");     scanf("%d",&n);     printf("reverse of your number %d is : ",n);     while(n!=0)         {         printf("%d",n%10); … Continue reading Chapter 6 Programming Exercise [ANSI C] Part-1

Introduction to C Language

C is a general-purpose high level language that was originally developed by Dennis Ritchie for the Unix operating system. It was first implemented on the Digital Eqquipment Corporation PDP-11 computer in 1972. The Unix operating system and virtually all Unix applications are written in the C language. C has now become a widely used professional … Continue reading Introduction to C Language

Chapter 5 Programming Exercise [ANSI C]

Programming in ANSI C Chapter-05 Programming Exercises 5.1: Write a to determine whether a given number is “odd” or “even” and print the message NUMBER IS EVEN or, NUMBER IS ODD. (a) without using else option, (b) with else option. (a) Solution: #include <stdio.h> int main() {     int num;     printf("Enter the number=");     … Continue reading Chapter 5 Programming Exercise [ANSI C]

Chapter 4 Programming Exercise [ANSI C]

Problem no.  4.1:Given the string“WORDPROCESSING”, Write  a program to read the string from the terminal and Display the same in the following format: (a)WORD PROCESSING (b)WORD PROCESSING (c)     W.P. Solution: #include <stdio.h> int main() {     char s[10], d[11];     printf("enter the string=");     scanf("%4s%10s",s,d);     printf("(a)%s %s\n",s,d);     printf("(b)%s\n%s\n",s,d);     printf("(c)%.1s.%.1s",s,d);     return 0; } Problem no. … Continue reading Chapter 4 Programming Exercise [ANSI C]