main()
{
printf(5+"Vidyarthi Computers");
}
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / shruti
arthi computers..
i think 5 characters is 0 - 5 and not 1- 5...
| Is This Answer Correct ? | 2 Yes | 2 No |
How to add two numbers with using function?
What is meant by keywords in c?
int arr[] = {1,2,3,4} int *ptr=arr; *(arr+3) = *++ptr + *ptr++; Final contents of arr[]
Which of the following is not a valid declaration for main ()? 1) int main() 2) int main(int argc, char *argv[]) 3) They both work
Is there any restriction in how many arguments printf or scanf function can take? in which file in my c++ compiler i can see the code for implementation of these two functions??
What is printf () in c?
How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
What are the different types of data structures in c?
How many ways are there to swap two numbers without using temporary variable? Give the each logic.
What is the real time usage volatile?
what are the uses of structure?
What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }