main()
{
printf(5+"Vidyarthi Computers");
}

Answers were Sorted based on User's Feedback



main() { printf(5+"Vidyarthi Computers"); }..

Answer / sujith

I would rather say

rthi Computers

Reason is printf() takes a pointer to char to print the
string. we said 5+"Vidyarthi Computers" so this is
interpreted as "rthi Computers" becuase we have added 5 to
the base pointer. so it will print only "rthi Computers".

Is This Answer Correct ?    18 Yes 0 No

main() { printf(5+"Vidyarthi Computers"); }..

Answer / devvv

rthi computers

Is This Answer Correct ?    7 Yes 0 No

main() { printf(5+"Vidyarthi Computers"); }..

Answer / vignesh1988i

rthi computers

since this will be taken as a string and 5 is the subscript value and prints the remaining characters from 'r'.

Is This Answer Correct ?    3 Yes 0 No

main() { printf(5+"Vidyarthi Computers"); }..

Answer / shruti

arthi computers..


i think 5 characters is 0 - 5 and not 1- 5...

Is This Answer Correct ?    2 Yes 2 No

main() { printf(5+"Vidyarthi Computers"); }..

Answer / rani

output is


rati Computers

Is This Answer Correct ?    1 Yes 3 No

main() { printf(5+"Vidyarthi Computers"); }..

Answer / vijay

ouptput:-
vidya

Is This Answer Correct ?    1 Yes 11 No

Post New Answer

More C Interview Questions

What is C language Terminator?

15 Answers   TCS,


What does static mean in c?

1 Answers  


What is a volatile keyword in c?

0 Answers  


Tell about strtok & strstr functions

2 Answers   HCL, iFlex, Motorola,


Is it possible to run a c program without using main?If yes HOW??

13 Answers   Wipro,






What is structure of c program?

0 Answers  


Define a structure to store the record of library. The record must consist of at least following fields: Title, Author, Edition, Price, Publisher, and Category. -Define functions authorSearch ( ), TitleSearch ( ) and CategorySearch ( ) to search a book with respect to author, title and category. [There can be more than one book, written by one author, in one category]

2 Answers  


Where is c used?

0 Answers  


c program to compute AREA under integral

0 Answers   Infosys,


Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff

0 Answers  


What is the difference between functions getch() and getche()?

0 Answers  


What are the restrictions of a modulus operator?

0 Answers  


Categories