Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Find the output the following C program? #include<stdio.h> int main() { char x=65; x=x+10; printf(“%d” x) return 0; }

user-image
Question added by Amit Kumar , Sr SEO Engineer , Amvrin System Pvt Ltd
Date Posted: 2015/04/15
Gayasuddin Mohammed
by Gayasuddin Mohammed , Advocate , Practicing Law before High Court at Hyderabad

it prints75. even in case you initialise

char x = 'a';

x=x+10;

printf("%d", x);

will also print the value of a +10

in case of printf("%c", x) will result the output as 'k'

printf(“%d” x) has a syntax error!

geeta sethi
by geeta sethi , faculty , apar india college

When you run a program It will show the value of x =75

YONGTOH DIANGHA
by YONGTOH DIANGHA , Customer Services , MTN Cameroon

When you run the program, it will give a value of75 and stops.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.