What are the valid types of data that the main () can
return in C/C++ language

Answers were Sorted based on User's Feedback



What are the valid types of data that the main () can return in C/C++ language..

Answer / ayushi rastogi

Int

Is This Answer Correct ?    14 Yes 2 No

What are the valid types of data that the main () can return in C/C++ language..

Answer / milind furia

int and void(if u consider this as a datatype) only

Is This Answer Correct ?    4 Yes 6 No

What are the valid types of data that the main () can return in C/C++ language..

Answer / umashankar mishra

c returns int data type
whereas c++ return void

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More OOPS Interview Questions

1. Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)

1 Answers   Nagarro,


WHAT IS THE DIFFERENCE BETWEEN OBJECT BASED & OBJECT ORIENTD PROGRAMMING LANGUAGE.(GIVE AT LIST 4 PIONT)

1 Answers   TCS,


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  


i^=j; j^=i; i^=j; value of i,j

1 Answers  


WHAT IS THE ACTUAL DEFINATION OF OBJECT AND THE CLASS IN ONE SINGLE LINE WHICH THE INTERVIEWER WANT TO LISTEN.

11 Answers  






What are the advantages of polymorphism?

0 Answers  


What is polymorphism and its types?

0 Answers  


what is ns string? what is ns array?

1 Answers  


what is inline function?

3 Answers  


what is difference b/w object based and object oriented programming language?

18 Answers   Chaitanya, College School Exams Tests, Educomp, IBM, Infosys, Telko,


What is abstraction and encapsulation?

0 Answers  


what is the abstract class,interface ,its difference with a programatic eg.? hi,recently i went for an interview they ask me what is abstract class ,interface and its difference I said abstract class contain abstact method ,abstract method is a method with no body.Abstract class cannot be instantiated.Abstract class is a base class it required derived class for the implementation of method. Interface is a syntactical contract that all derived class should follow it define properties ,method,events which are known as member of interface. Then They asked me what is the difference between them. I said abstract class interface 1.abstact class can implement method 1.interface cant 2.abstact class can contain constructor, 2.interface cant destructor 3.abstract class cannot support multiple 3.interface support inheritance etc Then they said some different answer I said dont no. Then they ask me when i should make abstract class for an project and when i should make interface. I said if suppose there is two class which must be having method with different logic then we sholud make abstract class. and if suppose we have two class having method .with different logic then we can make interface . Am i correct with my explaination.if not correct me .please provide me that when should we create abstract class and interface and what is difference .please help me

1 Answers  


Categories