Posts

Showing posts with the label c programming

Conditional Rendering in React Complete Guide with Examples 2026

Image
  Conditional Rendering in React Conditional Rendering is one of the most useful concepts in React. It means showing different content on the screen depending on a condition. For example: If a user is logged in → show Logout If a user is not logged in → show Login If a student has passed → show Congratulations If a product is available → show Buy Now If data is loading → show Loading... React does not have a separate if rendering tag. Instead, we use normal JavaScript conditions such as if, the ternary operator, &&, and switch to decide what should appear in the UI.

Write C Program To Print Multiplication Table using For Loop

Image
C Program   Write  C Program  To Print  Multiplication Table  using For Loop Examples :-       #include <stdio.h> void main () { int n,i; printf ( " Enter Any Number: " ); scanf ( " %d " , & n ); for ( i = 1 ;i <= 10 ;i ++ ) printf ( " %d \t " ,i * n ); } Write  C Program  To Print  Multiplication Table  using For Loop Explain Program Step :1 #include<stdio.h> Standard Input/Output header file.

C Language Program to Find Sum and Average of 3 Numbers

Image
                                    C Program find Sum and Average of the Three Number Examples :-       #include <stdio.h> void main () { int a,b,c,s,v; printf ( " Enter First Number :" ); scanf ( " %d " , & a); printf ( " Enter Second Number :" ); scanf ( " %d " , & b); printf ( " Enter Third Number: " ); scanf ( " %d " , & c); s = a + b + c; printf ( " sum of given Numbers is %d \n " ,s ); v = s / 3 ; printf ( " Average of given Number is %d " ,v ); } C Language Program to Find Sum and Average of 3 Numbers Explain Program Step :1 #include<stdio.h>  use functions like printf() and scanf().

C Program for Printing Alphabet Patterns with Examples

Image
             C Program    C Program for Printing Alphabet Patterns Example :- #include <stdio.h> void main () { int r,c; clrscr (); for ( r=65;r<=69;r++ ) { for ( c=r;c>=65;c-- ) { printf ( "%c",r ); } printf ( "\n" ); } getch (); } C Program for Printing Alphabet Patterns with Examples Explain Program Step :1 #include<stdio.h> standard input/output header file

How to Calculate Grade in C Program with Marks Example

Image
                                 C Program   c program  to find grade of a student code example   Example : #include <stdio.h> #include <conio.h> void main () { int marks; clrscr (); printf ( " Enter Marks " ); scanf ( " %d " , & marks); if ((marks < 100 ) && (marks > 70 )) { printf ( " Destinction " ); } else if ((marks > 60 ) && (marks < 69 )) { printf ( " First Class " ); } else if ((marks >= 50 ) && (marks < 59 )) { printf ( " Second Class " ); } else if ((marks >= 40 ) && (marks <= 49 )) { printf ( " Third Class " ); } else { printf ( " Fail " ); } getch (); } C program to find grade of a Student  Explanation:- 100 To 70  :- destinction 60  To  69  :- First Class 50 To  59   :- Second Class 40 To  49   :- Third Class fail C program to find grade of ...

C Program Print Right Half Pyramid pattern

Image
c program C Program  Print Right Half Pyramid pattern Examples :-       #include <stdio.h> #include<conio.h> int main () { int i,j,row; printf ( " enter the number " ); scanf ( "%d",&row ); for ( i=1;i<=row;i++ ) { for ( j=1;j<=i;j++ ) { printf ( "*" ); } printf ( "\n" ); } return 0 ; } C Program  Print Right Half Pyramid pattern  Program Output  C Program  Print Right Half Pyramid pattern Explain Program Step 1 ]   #include<conio.h>  input/output  functions like printf() and scanf( )

Check Voting Eligibility in C Program (Step-by-Step Guide)

Image
                      C Program   Write a C Program to Check Age Eligibility for Voting Example  :- #include <stdio.h>   #include <conio.h> int main () { int age; clrscr ();   printf ( "enter your age :-" ); scanf ( " %d " , & age); if (age >= 18 ) { printf ( "you are eligible to vote" ); } else { printf ( "you are not eligible for vote" ); } getch (); return 0 ; } C Program to Check Whether a People is Eligible to Vote or Not    Explain Program Step :1       #include <stdio.h> use input/output library for functions like printf() and scanf( ) .

c program to check number is even or odd use if else

Image
                            c program c program to check number is even or odd Examples :- // even or odd program if else //if else statement statement only allows // program to execute one block of code if a check condition // is true than execute the block or condition is false than exite the block // of code. #include <stdio.h> int main() { int number= 0; printf(" enter a number "); scanf(" %d",&number) ; if(number %2 ==0 ) { printf( "%d is even" ); } else { printf( "%d is odd" ); } return 0; }  c program to check number is even or odd use if else Explain Program Step :1 #include <stdio.h>  input-output use printf() & scanf() function. Step :2 int main()  point of the C program. All execution . Step :3 printf("enter a number"); Prints a prompt for the user. You could add a newline ( "\n" ) for cleanliness. Step :4 scanf("%d", &number); Reads an integer from the u...

C Program to Check Number is prime or Not prime

Image
                                       C Program    C Program to Check Number is prime or Not prime Examples :- #include <stdio.h> #include <conio.h> void main () { int a, i, flag = 0 ; printf ( "enter a positive integer" ); scanf ( " %d " , &a ); if (a == 0 || a == 1 ) flag = 1 ; for (i = 2 ;i <= a / 2 ;i ++ ) { if (a % i == 0 ) { flag = 1 ; break ; } } if (flag == 0 ) printf ( " %d is prime number " , a); else printf ( " %d is not prime number" ,a); getch (); return 0 ; } C Program to Check Number is prime or Not prime Explain Program Step :1 #include <stdio.h>  Standard Input Output library, which is required for functions like printf() and scanf(). Step :2 void main() This is the main function, where program execution starts. Step :3 int a, i, flag = 0;  stores the number  a, b entered by the user. Step :4 printf ("enter a po...

C Program to Add Two Integers number

Image
                                        C Program   1] C Program to Add Two Integers numb er  Examples :- #include<stdio.h> #include<conio.h> int  main() { int   V, W, sum =0 ; printf( " Enter Two number integer:" ); scanf( "%d%d", &V, &W ); sum=V+W; printf( " sum %d", sum ); getch(); return 0; } C Program to Add Two Integers number Explain Program Step :1 #include <stdio.h>  input-output use printf() & scanf() function. Step :2 int main()  point of the C program. All execution . Step :4 int V, W, sum = 0; Declares three integers: V, W, and initializes sum to 0. Step :5 printf("Enter Two number integer:"); Prompts the user. Step :6 scanf("%d%d", &V, &W);  two integers from keyboard input and stores them in V and W. %d matches integers and & passes the variable's address so scanf can store v...

What is the C language

Image
                  What is the C language 1]    full form  c stands for computer programming  language .   2] C language  developed and father by Dennis Ritchie at the  Bell Laboratories in 1972 .   3] C is widely use programming language they are important for the c is low level programming       efficiency simplicity and flexibly, portability influence, system and application software embedded  system, large ecosystem, interfacing with hardware is programming language .  4] C Is a general-purpose programming language.  5] C is middle level programming language.   6] Used c language developing computer software, system programming, application, games such as windows and complicated programs such oracle database, python, git, interpreter  7] C is an imperative procedural language supporting structured programming.  8] C langu...