Showing posts with label Interview Questions. Show all posts
Showing posts with label Interview Questions. Show all posts
Wednesday, 10 September 2014
ANS:
2. What is a pointer?
3. What are the uses of a pointer?
4. What is a structure?
5. What is a union?
6. What are the differences between structures and union?
7. What are the differences between structures and arrays?
8. In header files whether functions are declared or defined?
9. What are the differences between malloc () and calloc ()?
10. What are macros? What are its advantages and disadvantages?
12. What is static identifier?
13. Where is the auto variables stored?
14. Where does global, static, and local, register variables, free memory and C Program
15. Difference between arrays and linked list?
16. What are enumerations?
17. Describe about storage allocation and scope of global, extern, static, local and register
18. What are register variables? What are the advantages of using register variables?
19. What is the use of typedef?
20. Can we specify variable field width in a scanf() format string? If possible how?
21. Out of fgets() and gets() which function is safe to use and why?
22. Difference between strdup and strcpy?
23. What is recursion?
24. Differentiate between for loop and a while loop? What are it uses?
25. What is storage class? What are the different storage classes in C?
26. What the advantages of using Unions?
27. What is the difference between Strings and Arrays?
28. What is a far pointer? Where we use it?
29. What is a huge pointer?
30. What is a normalized pointer, how do we normalize a pointer?
31. What is near pointer?
32. In C, why is the void pointer useful? When would you use it?
33. What is a NULL Pointer? Whether it is same as an uninitialized pointer?
34. Are pointers integer?
35. What does the error ‘Null Pointer Assignment’ means and what causes this error?
36. What is generic pointer in C?
37. Are the expressions arr and &arr same for an array of integers?
38. IMP>How pointer variables are initialized?
39. What is static memory allocation?
40. What is dynamic memory allocation?
41. What is the purpose of realloc?
42. What is pointer to a pointer?
43. What is an array of pointers?
45. Is it possible to have negative index in an array?
47. What modular programming?
49. What is an argument?
51. Difference between formal argument and actual argument?
53. What is the difference between an enumeration and a set of pre-processor # defines?
54. How are Structure passing and returning implemented by the complier?
55. IMP>what is the similarity between a Structure, Union and enumeration?
57. How can we read/write Structures from/to data files?
58. Write a program which employs Recursion?
60. Difference between array and pointer?
61. What do the ‘c’ and ‘v’ in argc and argv stand for?
63. What are C identifiers?
64. Difference between syntax vs logical error?
65. What is preincrement and post increment?
66. Write a program to interchange 2 variables without using the third one.
67. What is the maximum combined length of command line arguments including the space
68. What are bit fields? What is the use of bit fields in a Structure declaration?
69. What is a preprocessor, what are the advantages of preprocessor?
70. What are the facilities provided by preprocessor?
71. What are the two forms of #include directive?
72. How would you use the functions randomize() and random()?
73. What do the functions atoi(), itoa() and gcvt() do?
74. How would you use the functions fseek(), freed(), fwrite() and ftell()?
75. What is the difference between the functions memmove() and memcpy()?
77. IMP>what are the types of file?
79. What is meant by file opening?
81. What is a file pointer?
83How is a file closed ?
85. What is the purpose of ftell ?
87. Difference between a array name and a pointer variable?
88. Represent a two-dimensional array using pointer?
89. Difference between an array of pointers and a pointer to an array?
90. Can we use any name in place of argv and argc as command line arguments ?
92. Differentiate between a constant pointer and pointer to a constant?
93. Is the allocated space within a function automatically deallocated when the function
94. Discuss on pointer arithmetic?
95. What is the invalid pointer arithmetic?
97. Are the expressions *ptr ++ and ++ *ptr same?
98. What would be the equivalent pointer expression foe referring the same element as
99. Are the variables argc and argv are always local to main?
100. Can main () be called recursively?
101. IMP>Can we initialize unions?
Ans: ANSI Standard C allows an initializer for the first member of a union. There is no standard
102. What’s the difference between these two declarations?
103. Why doesn’t this code: a[i] = i++; work?
105. Why can’t we compare structures?
106. How are structure passing and returning implemented?
Wednesday, 6 August 2014
Q)
State the main difference between C++ and Java?
Ans:The main difference between C++ and Java lies in multiple
inheritances. Java Meta class model has a better solution than C++. Persistent
objects can be implemented by features such as object serialization and
reflection mechanism. GUI can be implemented easily.
Q)Explain about Core Java?
Ans:Java is increasingly used for middleware applications
to communicate between Server and clients. Java has features such as
multithreading, portability and networking capabilities. Changes in the java
library made java as a favorite programming language for developers it added
functionality to their scripts.
Q)
State some advantages of Java?
Ans:Platform independence is the key feature of Java during
runtime. Syntax of java is similar tothe popular object oriented languages such as C and C++. Java program can eliminate most of the bugs present
in the program. Manual memory allocation and de allocation feature present in Java is automated.
Q)
Explain about Class in Java?
Ans:In Java every thing exists within a class. It defines the
behavior of the class and its characteristics. Java applications and applets
are built in the class. Rules present for class name are generous and some of
the basic rules are names should start with a letter after that letter they can
have any combination of letters and digits. It can contain names to any length.
Q)
Explain about data types?
Ans:Variables declared should have a declared type. Out of
the eight data types four data types are integer, two are floating type
integers, one is character type out of which one is Boolean and the other
Unicode. Core Java is known to be a strong typed language.
Q)Explain
about the performance aspects of Core Java?
Ans:Performance of interpreted byte codes is enough but it can be improved
much more than that. Byte codes are translated into machine language within no
time, this speed of execution can be achieved during application compiling
time. JIT compilers are also present which compile the byte codes into native
code.
Q)
Explain about the dynamic behavior of core java?
Ans:This language was designed to adapt the changing
environment and behavior. New methods and instance variables can be added to
the client side without any major changes happening at the client end. This
function is very important for GUI builders, pluggable components, debuggers
and object database.
Q)
Explain about Java SDK?
Ans:Java SDK is not so comfortable with people used to command line interpreter. IDEs include compilers,
editors, debugging facilities, drag and drop techniques, etc. This compiler
strives to generate hundreds of lines in code UI. This platform may become a
universal platform.
Q)
Explain about the security aspect of Java?
Ans:Java has some bugs in its applets. Java team stated that
they have zero tolerance over security features and subsequent editions of Java
are improving Bug free environment. Some of the features are overriding the
runtime stack, disallowing the corruption of memory outside its own process,
reading or writing on local files where
it is actually forbidden to do these processes, etc.
Q)Explain
about the interpreter in Java?
Ans:Machines should have Java interpreter for the Java byte
code to get executed. Linking is a very easy process and this feature helps
while developing applications. Java compiler which
is available with software development kit is a bit slower in execution of
scripts.
Q)What
are the three best choices for development environment?
Ans:The three best choices for development environment
include.
Java SDK
and text editor can be a perfect choice.
Java SDK
and a text
editor which is built
within the SDK.
Using IDE
such as free Forte community edition.
Q)
Explain about assignment statement?
Ans:After declaring a variable, it should be initialized
explicitly. Uninitialized variable can never be used. To a declared variable
you must assign a variable name on the left, equal sign and a java expression
should have a appropriate value to the right.
Q) Give
the difference between the println method and sqrt method?
Ans: Println method operates on the object system. out and has
the value which should be printed namely y. sqrt method is a static method. It
does not operate on any object. It has the number stored in x for which the square toot should be found out.
Q)
Explain about strings in Java?
Ans:Strings represent nothing but a string of characters.
Java does not have any built in string type. It contains predefined class which
can be called enough as a String. Instance of a string is called as a string.
Much similar to many object
oriented languages a + sign is
used.
Q)
Explain the reason behind ending a program with a System. exit (0)?
Ans: The reason behind ending a program with System. exit (0)
involves technicalities. When main method exits the new thread automatically
does not end. The appearance of this thread is because of dialog box
functionality. System. exit
Candidates can also
comment below for more details regarding Pay scale, education
qualification etc. Applicants can also follow us for more details and updates
regarding the Government jobs 2014 or you can also follow us on Facebook for
latest jobs updates Latest updates regarding this article will be published so keep visiting on www.enaukari.in
Soon more details for Recruitment 2014 will be available online so keep visiting our website for further details and updates .Also for more updates on This post stay connected with us on Facebook or Google+
Subscribe to:
Posts (Atom)