Wednesday - June 7, 2023

C Programming Examples with Output Part – 5

c fundaments

Program

c program examples, c programming examples with output, basic programs in c, c programs for practice, c language basics, c programs for interview, c programming questions, c programming tutorial, c program examples, basic programs in c, c programming software, c programming tutorial, c programs for practice, c programs with solutions, c program online compiler, c program examples, c program to add two numbers, c program compiler, c program to find factorial of a number, c program to reverse a number, c program to reverse a string, c program for prime number, structure of c program, hello world c program, leap year c program, bubble sort in c program, merge sort in c program, quick sort in c program,
C Programming Examples with Output Part – 5 ~ Image by ©Ishwaranand
 

1) what is the output of the following program? If the user inputs the values as AMRAVATI NAGPUR YAVATMAL

 void main()
{
         char a, b, c;
         scanf(“%c%c%c”, &a, %b, &c);
         printf(“a=%c b=%c c=%c”, a, b, c);
}
Output:
a = A b = M c = R

2) what is the output of the following program? – Increment decrement

# include <stdio.h>
void main()
{
          int a=7;
          printf(“”%d””, a++);
          printf(“”n%d””, a++ * a++);
          printf(“”n%d””, ++a *++a);
}
output:
7
72
132

Last updated on Friday - May 26th, 2023

.