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   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
How to use c/c++ code in JAVA
 Question Submitted By :: Rusmguys
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to use c/c++ code in JAVA
Answer
# 1
basically c is similar to java than c++, its better to use 
the code in c which is very similar to java...
 
Is This Answer Correct ?    0 Yes 0 No
Guest
 
  Re: How to use c/c++ code in JAVA
Answer
# 2
in the form of headerfiles
 
Is This Answer Correct ?    0 Yes 0 No
Ramu
 
 
 
  Re: How to use c/c++ code in JAVA
Answer
# 3
use c/ c++ linkage specifications
 
Is This Answer Correct ?    0 Yes 0 No
Mohmedali
 
  Re: How to use c/c++ code in JAVA
Answer
# 4
Java Native Interface
is only correct ans.
it provide JNI.H header file.

only use method in java.
then
use the run command
javah -jni classname,
it creates classname.h header cpp file
we produce classname.cpp file 
and 
use run command 
cl /LD classname.cpp

it produces .dll file

then
we compile and run java file
without using these steps u can't compile or run it.it 
produces error because the method used in java is not 
defined,,,
 
Is This Answer Correct ?    0 Yes 0 No
Jaya Prakash
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
main() { int x=5; printf("%d %d %d\n",x,x<<2,x>>2); } what is the output? Ramco6
How can I call a function, given its name as a string? ABC-Telecom1
int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why? TCS3
main() { char *p; p="Hello"; printf("%c\n",*&*p); } ME2
what is the difference between <stdio.h> and "stdio.h" Kanbay5
What is an volatile variable? HP6
write a program to find the sum of the array elements in c language?  3
I have a function which accepts a pointer to an int. How can I pass a constant like 5 to it?  3
You are given a string which contains some special characters. You also have set of special characters. You are given other string (call it as pattern string). Your job is to write a program to replace each special characters in given string by pattern string. You are not allowed to create new resulting string. You need to allocate some new memory to given existing string but constraint is you can only allocate memory one time. Allocate memory exactly what you need not more not less. Microsoft1
the code is::::: if(condition) printf("hello"); else printf("world"); WHAT WILL BE THE CONDITION IN IF IN SUCH A WAY THAT BOTH HELLO AND WORLD ARE PRINTED IN A SINGLE ATTEMPT?????? SINGLE ATTEMPT IN THE SENSE... IT MUST FIRST PRINT "HELLO" AND IT MUST GO TO ELSE PART AND PRINT "WORLD"..... NO LOOPS, RECURSION ARE ALLOWED........................ IBM7
10. Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",s); } What will happen if it is compiled & run on an ANSI C Compiler? A)It will compile & nothing will be printed when it is executed B)it will compile but not link C)the compiler will generate an error D)the compiler will generate a warning Accenture4
Unsigned char c; for ( c=0;c!=256;c++2) printf("%d",c); No. of times the loop is executed ? Mascot3
What is the diffrent between while and do while statement ?  3
If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",a[0]); return 1; } what will be the output? Hughes5
What is the difference between big endian form and little endian form? write a code to convert big endian form to little endian and vice versa.. Aricent1
Write a program that takes three variables(a,b,c) in as separate parameters and rotates the values stored so that value a goes to b,b,to c and c to a  2
6. Which of the Following is not defined in string.h? A)strspn() B)strerror() C)memchr() D)strod() Accenture1
What is an anonymous union and where to apply that ? HP1
How to write a program for swapping two strings without using 3rd variable and without using string functions. iGate4
what are brk, sbrk? Oracle1
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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