So, What is C Programming and why should we learn it as a beginner on IT industries? C is a programming language developed at AT & T’s Bell Laboratories of USA in 1972 by Dennis Ritchie. it is a general-purpose programming language that is extremely popular, simple, and flexible to use. It is a structured […]
C
Write a C Program to count numbers of vowels and consonants?
Write a C Program to count numbers of vowels and consonants? In the C Program to count numbers of vowels and consonants, we should use string, switch case for, etc., conditional statements and loops. You can see here how we can write a c program to count numbers of vowels and consonants. The letters of […]
write a c program to To calculate factorial using while loop
/* C Program to calculate factorial using while loop */ Factorial of a whole number ‘n’ is defined as the product of that number with every whole number till 1. For example, the factorial of 4 is 4×3×2×1, which is equal to 24. It is represented using the symbol ‘!’ So, 24 is the value […]
Write a c program to Print the largest even and odd number from the list?
To print the largest even and odd number from the input 10 number, in C Program you have to write a code like this. /* Print the largest even and odd number from the list */ #include<stdio.h> #include<conio.h> void main() { int i, num, even=0, odd=0; printf(“\nEnter any ten numbers: “); for(i=0;i<10;i++) { scanf(“%d”,&num); if […]
C program to show increment and decrement operators uses
write a C program to show the increment and decrement operators uses… /* Increment and decrement operations */ #include<stdio.h> void main() { int a,b,c; a = b = c = 0 ; printf( ” Initial value of a,b,c %d %d %d \n”, a,b,c); a = ++b + ++c; printf( ” a = ++b + ++c […]
What is Object Oriented Programming (OOP) paradigm? Explain basic concepts OOP.
Object-oriented programming (oop) is a programming paradigm that represents the concept of “object” that have data fields (attributes that describe the object) and associated procedures known as methods. An object can be considered a “thing” that can perform a set of related activities. The set of activities that the object performs defines the object’s behaviour. […]
write a c program to show the use of post and pre decrement function
/* using decrementer */ #include void main() { int i,j; int x,y; j = i=6; printf(” initial value i = %d\n”, j); x = i–; printf(“x= i–, value of x = %d, and value of i = %d\n”, x,i); i = j; y = –i; printf(“initial value i = %d\n”, j); printf(“y = –i, value […]
C program to show the example of post and pre Increment
/* using incrementer */ #include void main() { int i,j; int x,y; j=i=6; printf(“initial value of i = %d\n”,j); x=i++; printf(“x=i++, value of x=%d, and value of i=%d\n”,x,i); //post increment i=j; y=++i; printf(“initial value i = %d\n”,j); printf(“y=++i, value of y=%d, and value of i=%d\n”,y,i); // pre increment } run initial value of i = […]
Write a c program to show the example of increment operator
#include void main() { int a=8, b=2, x=8, y=2, sum1, sum2; /* Increment then add */ sum1=a+(++b); /* Add then increment */ sum2=x+(y++); printf(“\nSUM1=%d”,sum1); printf(“\nSUM2=%d”,sum2); } run SUM1=11 SUM2=10