c programming examples with output

Display ASCII Value in C

In this program, we will find ASCII value in C. C program to display the decimal value or ASCII value of a character. C program to find ASCII value in a given Range. Prerequisites for writing all below programs:- Data types in C Programming language Operators in C Programming language Output formatting using printf() in […]

Display ASCII Value in C Read More »

Swapping Program in C

There are many different swapping program in C language. Swap two numbers mean to exchange the values of two variables with each other. X=10 and Y=20 then after swapping X=20 and Y=10 Swapping program in C using a temporary variable Output:- a=20 b=10 Explanation:- At starting we take a=10, b=20 and the temporary variable c

Swapping Program in C Read More »

Undefined Reference to sqrt in C

Problem:- Undefined reference to sqrt() in C Programming (or other mathematical functions) even includes math.h header Windows user doesn’t get any warning and error but Linux/Unix user may get an undefined reference to sqrt. This is a linker error. In the below program, We used sqrt() function and include math.h If you are using a

Undefined Reference to sqrt in C Read More »

Hello World Program in C

Hello World! in C Programming. Here we will write the Hello world program in C language. In every programming first program example starts from displaying Hello, World! to the screen. In the above program, both words are displayed on the screen separately. We can write Hello, World! in a single line or in multi-lines. Output:-

Hello World Program in C Read More »