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       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories >> Software >> Programming-Languages
 
  C (727)  C++ (457)  Delphi (508)  Programming-Languages-AllOther (219)
 


 

Back to Questions Page
 
Question
How can I implement opaque (abstract) data types in C?
What's the difference between these two declarations?

	struct x1 { ... };
	typedef struct { ... } x2;
Rank Answer Posted By  
 Question Submitted By :: Roja
I also faced this Question!!   © ALL Interview .com
Answer
using the structures and the pointers
n structures the memory will be allocated for each object at 
different locations struct x1 { ... };
 
0
Phani Kumar S
 
 
Question
how many header file is in C language ?
Rank Answer Posted By  
 Question Submitted By :: Roja
I also faced this Question!!   © ALL Interview .com
Answer
4
 
0
Prak_ca04
 
 
Answer
it can have any number of header files. but it ha smore 
than 8 header files.
 
0
Lohith
 
 
 
Answer
there are manynumber hedder files because each hedder file
is used for different purpose.
for example if we are using pointers we will include
different hedder files with the standard hedder files as
#include<stdio.h>
 
0
Santosh
 
 
Question
Give 2 examples of a code optimization?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
I would like to quote two things from the same area.

1. Read/Write chunks from/into a file instead of byte by 
byte reading.

2. Aquire resources late and relieve it early. Example, if 
you want to use a file, open the file as late as possible 
and release it as early as possible after use.
 
0
Mms Zubeir
 
 
Question
How to reduce a final size of executable?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
Don't include unnecessary header files.
Don't link with unneccesary object files.
 
0
Lylez00
 
 
Question
What are the techniques you use for debugging?
Rank Answer Posted By  
 Question Submitted By :: Guest
This Interview Question Asked @   Adtran
I also faced this Question!!   © ALL Interview .com
Answer
By pressing F8 key then there's a window appears and there 
we have to write all the variables that we had used so far 
in the programme and press enter then the initial values of 
those variables taken as garbage if the variable not 
assigned any value or the assigned value will be displayed 
at bottom of the code seperated by a line.
     By pressing F8 Key continuesly debugging will be 
happened and somme times output screen also will appear and 
the values of variables also changed according to the logic.
This is the debugging process in c++ as well as c also.
 
0
Chaitanya Raj Budumuru
 
 
Question
Why preincrement operator is faster than postincrement?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
b/c preeincrement take one byte instruction & post 
increment takes two instruction
 
0
Devesh Patel
 
 
Answer
the pre inc operator increments the value of that particular
variable on that line itself

the post inc operator increments the value of that
particular variable  after going on the next line

in simple words

eg.

e=5;    on this line value of e=5

e++;     on this line value of e=5

++e;     on this line value of e=7
 
0
Sanish Joseph
 
 
Answer
Pre increment operator is use the concept of value by 
reference that means it increment the actual object.

While post increment use call by value concept that is it 
create the local object, operate on that, then it will 
increment actual object, so takes time to create local 
object
 
0
Ranjeet Garodia
 
 
Question
What is Memory Alignment?
Rank Answer Posted By  
 Question Submitted By :: Guest
This Interview Question Asked @   TCS
I also faced this Question!!   © ALL Interview .com
Answer
Memory alignment is the restriction imposed on memory 
allocation in such a way that values associated with 
multibyte get assigned only at certain places of memory. 
Such Memory alignment though generally not very common 
issue in OOPS terminology as the compiler takes care of 
allocation of bytes at proper locations.
 
0
Sv
 
 
Question
Write any small program that will compile in "C" but not in
"C++"?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
Hi All,

U can write many programs which will compile in C and not 
in C++.  Sample program.

const i;   /* this is possible in C but not in C++ */
const int i;  // it should be done like this in C++.


Thanks & Regards
Sathish Kumar
 
0
Sathish Kumar
 
 
Answer
We can do many programs which will run in C but not in C++
like if we declare

int class=8   /*It will run in C but not in c++ */
 
0
Aashish Kumar Nath
 
 
Answer
There are some features in C that are truncated in C++. To 
quote a few,

1. const int pi; // allowed in C.
   const int pi = 3.14; // equivalent in C++.

2. char name[10];
   for(int index = 0; index < 50; ++index)
   {
      scanf("%s", &name[index]); // sorry, I am weak in C.
   }

   This is allowed in C. That is, the array range checking 
is not done in C. In C++, it will throw an out of range 
error.

3. void function()
   {
     ....
   }

   int main()
   {
     function(299);
     return 0;
   }
  
   This is allowed in C but not in C++.
 
0
Mms Zubeir
 
 
Question
How to write Multithreaded applications using C++?
Rank Answer Posted By  
 Question Submitted By :: Guest
This Interview Question Asked @   Honeywell
I also faced this Question!!   © ALL Interview .com
Answer
Well, ISO C++ doesn't provide the mechanisms to control 
over operating system devices like thread. We need to use 
the support provided by the operating system SDKs or any 
third party libraries. For example, Win32's CreateThread() 
API would help.
 
5
Mms Zubeir
 
 
Answer
It depends most of for what kind of system we will use to 
run application.
Linux - standard POSIX pthread library coud be used (it is 
C thrading implementation),
Windows - Win32 API,
or we can use boost threading library wich provides sets of 
objects for thread creation and synchronization.
 
0
Peter_2012
 
 
Question
How many lines of code you have written for a single program?
Rank Answer Posted By  
 Question Submitted By :: Guest
This Interview Question Asked @   BoA , BoA, BoA
I also faced this Question!!   © ALL Interview .com
Answer
Atleast there should be 4 lines.it must consists of main 
with the parenthesis and atleast a statement in it.
 
0
Ilakya.g
 
 
Question
Explain about profiling?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
In symbian , we have a tool called profiler which provide 
different type of information about the application(s) like 
which thread is taking how much CPU time, memory usage, 
life time of an object, resource utilization etc..,

Using of Profiler to get above info is called profiling.

To use this we have to add the profiler .lib and related 
functionality code to our program.
 
0
Reejusri
 
 
Question
Explain working of printf?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
It is used to print the statement within the codes of 
printf statement.
 
0
Ilakya.g
 
 
Answer
Printf is a Variadic function. Variadic functions are 
functions which may take a variable number of arguments and 
are declared with an ellipsis in place of the last 
parameter. 
int printf(char *, ...); 
Uses Var_args to know the variables in the ...
In C these are defined in stdarg.h
Refer to this link http://en.wikipedia.org/wiki/Stdarg.h
 
0
Kishore
 
 
Answer
Printf is a std lib func. It prints everything in the
Inverted commas until a format specifier or a escape
sequence is encountered.
 
0
Kamikaze
 
 
Question
When to  use Multiple Inheritance?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
Multiplae inheritance is used when we want to reuse the 
code from 2 ro 3 classes.
 
0
Dee
 
 
Answer
when do you like inherit from more than two class 
it is called multiple inheritance
 
0
Dasora
 
 
Answer
When i want wrap the properties of more than one class into
a single entity(class) ,then i want to use MI,but strongly
recommend to avoid MI, if this scenario occur then you
design having some problem, and it cast a lots of issue and
overhead.
 
0
Nishikant Sahu
 
 
Answer
Multiple inheritance means the derived class inherits from
two or more base classes.
 
0
Karthick
 
 
Question
What is "map" in STL?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
map class  support an associative  container  in which
unique  keys are mapped .with values. in essence  ,a key  is
 simply name  that you  give to a value .once  value you can
retrive   it by using  has  been stored. 

the most     general sense,   a map is  a list  of   key /
value  pairs .
 
0
Saroj Das ,balsore
 
 
 
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