ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories >> Software >> Programming-Languages >> VC++
 
  MFC (127)  ATL (23)  COM-DCOM (32)  Win32API (20)  ActiveX (16)
  VC++-AllOther (58)
 


 

Back to Questions Page
 
Question
A file a.cpp & B.cpp are complied & linked together in VC++
file a is something like int a =100;, File B is something 
like extern a;
main()
{
printf("%d",a);
}what will be the output.a)100,b)linker error,c)complier 
error etc etc.
Rank Answer Posted By  
 Question Submitted By :: Archana
This Interview Question Asked @   Honeywell
I also faced this Question!!   © ALL Interview .com
Answer
Compiler error
 
0
Zerozero
 
 
Answer
Take an example, if you are working on a C++ project but it
also deals with some existing C functions/libraries.
You want to wrap them in a C++ module or compile them with
other C++ objects without any C++ compiler errors, then you
would declare the C function prototypes in an extern "C"
block to notify the compiler that they would be compiled
along with other C++ functions into one module.

For example:

my_C_CPP_Header.h:

#ifndef MY_C_CPP_HEADER
#define MY_C_CPP_HEADER


/*check if the compiler is of C++*/
#ifdef __cplusplus
extern "C" {
int myOtherCfunc(int arg1, int arg2); /* a C function */
}
#endif

void myCppFunction1(); /* C++ function */
void myCppFunction2(); /* C++ function */

/*check if the compiler is of C++ */
#ifdef __cplusplus
}
#endif

#endif


Now all three functions are comiled into one module by C++
compiler.

So the out put is (a)100.
 
0
Shankar
 
 
Answer
It should be compiler 1 compiler error and 1 warning
Error : Undeclared identifier
we have to include stdio.h
Warning: main should return a value; but it assume as return
type as void.
 
0
Ashish Chandrakar
 
 
 
Question
what is the difference between compiling and building?
Rank Answer Posted By  
 Question Submitted By :: Prakashdasari
I also faced this Question!!   © ALL Interview .com
Answer
Build includes 2 things viz. Compile and then Linking. 
Linker tool of the tool chain uses some linker script file
(.ld extension or some other) to link all the object files 
from your code and that from library.
The compiler gives you object files from your source 
files.Most of times it has .o extension.
 
0
Achal Ubbott
 
 
Question
hi,I have applied for NIC test plz if any one have test 
paper pattrn plz send me on "mn_mayank38@yahoo.co.in"
Rank Answer Posted By  
 Question Submitted By :: Mayank
I also faced this Question!!   © ALL Interview .com
Answer
Y U GONG 4 SUCH A F*****G ORGANIGATION.... TURN UR D AND 
INSERT IN UR H**L.....
 
0
Jahapanah
 
 
Question
What is preemption ? context switching ?
Rank Answer Posted By  
 Question Submitted By :: Prabhakar S
I also faced this Question!!   © ALL Interview .com
Answer
Preemption in computing is refered to interuption of 
currently executed task by computer system or scheduler 
without application's cooperation in order to be resumed 
later. This process is known as context switching, when 
equal time slices are assigned by pre-emptive scheduler
 
0
Sm
 
 
Answer
Pre emption is releasing the process in order to serve 
another process to utilize the same resource. Context 
switching is the transfer of resource from once process to 
another process.
 
0
Telugodu
 
 
Answer
Preemption is when a task can be temporarily Interrupted &
expected to resumed later
Context switching is used for multi-tasking and Stores &
restores the CPU state.
 
0
Meena
 
 
Question
Q1. A. What is unary operator? List out the different 
operators involved in the unary operator.
B. What is an adjust field format flag?

Q2. A. Distinguish between a # include and #define. 
B. Can a list of string be stored within a two dimensional 
array?

Q3. A. Explain how a pointer to function can be declared in 
C++?
B. List the merits and demerits of declaring a nested class 
in
C++?

Q4. A. What are the syntactic rules to be avoid ambiguity 
in multiple
inheritence?
B. Explain the operation of overloading of an assignment 
operator.

Q5. A. Explain how the virtual base class is different from 
the
conventional base classes of the opps. 
B. Explain how an exception handler is defined and invoked 
in a
Program.
Q6. A. What is a binary file? List the merits and demerits 
of the binary 
file usagein C++.
B. Write short notes on Text Manipulation Routines.
C. Write bites in Turbo c++ Header ("Include") Files.




Rank Answer Posted By  
 Question Submitted By :: Kushiv30@gmail.com
This Interview Question Asked @   Infosys , ABC Company, Infosys, Hcl
I also faced this Question!!   © ALL Interview .com
Answer
1. A unary operator is one which has only one operand. e.g. 
post/pre increment operator.

3. A function pointer is declared as following. Rarely used

   int (*fp)(int);

  where fp is pointer to a function with an integer as 
argument and returns an integer value.
 
0
Achal Ubbott
 
 
Question
what is use of the createWindow object
Rank Answer Posted By  
 Question Submitted By :: Prateeku
This Interview Question Asked @   HCL
I also faced this Question!!   © ALL Interview .com
Answer
CreateWindow() physically creates the Window in memory 
based on the previousy registered WNDCLASS structure and 
returns a vaild HANDLE for that Window
 
0
Kriba
 
 
Answer
I am not satisfied with that answer.
 
0
Prateeku
[MET]
 
 
Answer
CreateWindow is a Win32 API used to create a window(
overlapped, child or main ).
While returning it sends message to WM_CREATE of the window
procedure
 
0
Meena
[MET]
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com