Goto Keyword in c Program

c prgram avoid goto

Goto Keyword in c Program In a difficult programming situation it seems so easy to use a goto to take the control where you want. However, almost always, there is a more elegant way of writing the same program using if, for, while and switch. These constructs are far more logical and easy to understand. … Read more

Introduction to Pointers in C

understanding c pointers

Introduction to Pointers in C Pointer Notation Consider the declaration, int i = 3 ; This declaration tells the C compiler to: Reserve space in memory to hold the integer value. Associate the name i with this memory location. Store the value 3 at this location. We may represent i’s location in memory by the … Read more

What wound be output of the following c program of function and pointer

c program example function pointer

What wound be output of the following c program of function and pointer What would be the output of the following programs:   main( ) { int i = 5, j = 2 ; junk ( &i, &j ) ; printf ( “\n%d %d”, i, j ) ; } junk ( int *i, int *j … 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 example function and value pass to function

c program for egg game

c program example function and value pass to function   main( ) { printf ( “\nOnly stupids use C?” ) ; display( ) ; } display( ) { printf ( “\nFools too use C!” ) ; main( ) ; }  

conditional operators c program example

c program for egg game

conditional operators c program example         What would be the output of the following programs: main( ) { int k, num = 30 ; k = ( num > 5 ? ( num <= 10 ? 100 : 200 ) : 500 ) ; printf ( “\n%d”, num ) ; }   … Read more