if i have same function with same number of argument but
defined in different files. Now i am adding these two files
in a third file and calling this function . which will get
called and wht decide the precedence?



if i have same function with same number of argument but defined in different files. Now i am addi..

Answer / s.verma

The return type of the function and the type of arguments
passed to the function will determine which function will be
called.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

0 Answers   IBM,


can you explain how to use JavaBean in Project

3 Answers   Infosys, Satyam,


#include <stdio.h> #include <alloc.h> #include <stdlib.h> #include <conio.h> void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals.

0 Answers  


What is Method overloading?

5 Answers  


How do you define a class in oop?

0 Answers  


can we make a class static without using static keyword?

5 Answers   Aspire,


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

0 Answers  


What is data binding?

4 Answers   Ittiam Systems,


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

0 Answers  


design class for linked list and include constructor,destructor,insert option. struct node { int node; struct node &ptr; }

1 Answers   HSBC,


What are the 3 pillars of oop?

0 Answers  


what is an instance of a class

5 Answers  


Categories