Wednesday - February 21, 2024
#C, C++ and C# #Blog #C Program #Computer Science

C Programming Examples with Output Part – 4

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 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,

1) What is the output of the following program? – 3 Value Increment decrement

void main()
{
             int  x=125, y=140, z=175;
             char a= 'A', b='B', c='c';

             X= ++X + --Y + Z--;
             Y=X-- + ++Y + Z++;
             Z=--X + Y + Z++;
             A= A++;
             B+=1;
             C= --C+ 1;

            printf ("x=%d y=%d z=%d/n", x, y, z);
            printf (" a=%c b=%c c=%c/n", a, b, c);
            printf ("a=%d b=%d c=%d/n", a,b,c);
}

Output:
x=438 y=754 z=1368
a=B b=C c=C
a-66 b=67 c=67

.