|
INTERVIEW QUESTIONS
PROGRAMMING LANGUAGES
C
DETAILS
Question: What is the output of the following program: Int x = 3, y = 2; foo(x, y) { x = x + 2; y = y + 3; printf (“%d %d”, x,y); } main0 { int x,y; x = 5; y = 5; printf (“%d %d”, x,y); } a) 7 8 5 5 b) 5 5 5 5 c) 5 5 3 2 d) 7 8 7 8
Answer: 5 5 5 5
|
|
|
Category |
C Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 7561 users |
Added on |
6/8/2015 |
Views |
66808 |
Rate it! |
|
|
Question:
What is the output of the following program: Int x = 3, y = 2; foo(x, y) { x = x + 2; y = y + 3; printf (“%d %d”, x,y); } main0 { int x,y; x = 5; y = 5; printf (“%d %d”, x,y); } a) 7 8 5 5 b) 5 5 5 5 c) 5 5 3 2 d) 7 8 7 8
Answer:
5 5 5 5 Source: CoolInterview.com
Answered by: A.Deva | Date: 7/28/2010
| Contact A.Deva
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Write character a to z in random seqence in one dimensional array then how to get 'ABC' and then directly get the 'PQR' ?
|
View Answer
|
|
A lift can accept a maximum load of 1000 kg.write a program to check how many people enter lift & what is the total weight currently present in the lift? If it exceeds maximum limit,set a variable for overweight.if overweight variable is set ring alarm.
|
View Answer
|
|
What are the standard predefined macros ?
|
View Answer
|
|
What is the purpose of realloc( ) ?
|
View Answer
|
|
How can you restore a redirected standard stream ?
|
View Answer
|
|
What is Preprocessor ?
|
View Answer
|
|
Can a file other than a .h file be included with #include ?
|
View Answer
|
|
Can a file other than a .h file be included with #include ?
|
View Answer
|
|
How do you print an address ?
|
View Answer
|
|
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
|
View Answer
|
|
When should a type cast be used ?
|
View Answer
|
|
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
|
View Answer
|
|
How can do search for data in a linked list ?
|
View Answer
|
|
When does the compiler not implicitly generate the address of the first element of an array ?
|
View Answer
|
|
What is page thrashing ?
|
View Answer
|
|
When should the register modifier be used? Does it really help ?
|
View Answer
|
|
When should the volatile modifier be used ?
|
View Answer
|
|
What is the result of using Option Explicit ?
|
View Answer
|
|
Difference between const char* p and char const* p
|
View Answer
|
|
Can you tell me how to check whether a linked list is circular ?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All C Interview Questions & Answers - Exam Mode /
Learning Mode
|