pointer example program in C

pointer c program example

pointer example program in C What would be the output of following pointer program written in c   main( ) { int a = 10, b = 20 ; swapr ( &a, &b ) ; printf ( “\na = %d b = %d”, a, b ) ; } swapr( int *x, int *y ) { … Read more

c program example of function and value pass to function

c program example function and value pass to function 2

c program example of function and value pass to function c program example function and value pass to function 2 main( ) { int i = 45, c ; c = multiply ( i * 1000 ) ; printf ( “\n%d”, c ) ; } check ( int ch ) { if ( ch >= … Read more

C Program to print half pyramid using alphabets

C Programming Tutorial

C Program to print half pyramid using alphabets A B B C C C D D D D E E E E E Let’s see the program code #include <stdio.h> int main() { int i, j; char input, alphabet = ‘A’; printf(“Enter the uppercase character you want to print in last row: “); scanf(“%c”,&input); for(i=1; … Read more

Program to print half pyramid using *

c program for egg game

Program to print half pyramid using *   * * * * * * * * * * * * * * * #include <stdio.h> int main() { int i, j, rows; printf(“Enter number of rows to print: “); scanf(“%d”,&rows); for(i=1; i<=rows; ++i) { for(j=1; j<=i; ++j) { printf(“* “); } printf(“\n”); } return 0; … Read more