When a variable is declared with static keyword,its called
as static variable,means it retains its value across
different function calls.Its basically used for counting no
of objects created for a class in C++ and its initialized to
0 by default.
When a function declared as static,its called as static
function.It can only operate on static variables.
Please Help Members By Posting Answers For Below Questions
How to use CMutex, CSemaphore in VC++ MFC
what are the different types of qualifier in java?
what type of questions
define oops concept with example
assume the program must insert 4 elements from the key board
and then do the following programs.sequential search(search
one of the elements),using insertion sort(sort the element)
and using selection sort(sort the element).
write a program to find 2 power of a 5digit number with out
using big int and exponent ?
just right the logic of it
1--> If few people are electing then every time ur candidate
2--> arrange books in box, if box carry weight == books
weight then take another box..... find the no of box
Plese get me a perfect C++ program for railway/airway
reservation with all details.
write a code for this. serial_number contained in the
header of the file will be read , if this serial number is
less than a previous serial number within a successfully
processed file, or is the same as another serial number
within a successfully processed file, or if the field
contains anything other than 7 digits, then the file must
error with the reason ‘Invalid SERIAL_NUMBER’.
String = "C++ is an object oriented programming language.An
imp feature of oops is classes and objects".Write a pgm to
count the repeated words from this scenario?
explain sub-type and sub class?
atleast u have differ it into 4 points?
Question In a class, there is a reference or pointer of an
another class embedded, and the memory is either allocated
or assigned to the new object created for this class. In
the constructor, parameters are passed to initialize the
data members and the embedded object reference to get
inialized. What measures or design change should be advised
for proper destruction and avioding memory leaks, getting
pointers dangling for the embedded object memory
allocation? Please suggest.
Question Submitted By :: Sunil Kumar
I also faced this Question!! Rank Answer Posted By
Re: In a class, there is a reference or pointer of an
object of another class embedded, and the memory is either
allocated or assigned to the new object created for this
class. In the constructor, parameters are passed to
initialize the data members and the embedded object
reference to get inialized. What measures or design change
should be advised for proper destruction and avioding
memory leaks, getting pointers dangling for the embedded
object memory allocation? Please suggest.
# 1 use copy constructors
There is something to be taken care in destructor, in copy
constructor, suppose the memory is assigned to the embedded
member object pointer with the parameter passed value, but
if some other objects of different class also are pointing
to this memory, then if some one deletes the object then
this class member pointer object will become dangling, or
if the object is not deleted properly then there will be
memory leak. Please suggest the design change required to
handle or avoid this situation
Please send ford technologies placement paper 2 my mail id
//please comment on the output
void insert(struct btreenode **, int);
void inorder(struct btreenode *);
struct btreenode *leftchild;
struct btreenode *rightchild;
struct btreenode *bt;
bt=(struct btreenode *)NULL;
printf("Enter number of nodes");
void insert(struct btreenode **sr, int num)
*sr=(struct btreenode *)malloc (sizeof(struct btreenode));
(*sr)->leftchild=(struct btreenode *)NULL;
(*sr)->rightchild=(struct btreenode *)NULL;
if(num < (*sr)->data)
void inorder(struct btreenode *sr)
if(sr!=(struct btreenode *)NULL)
please Modify the given program and add two methods for post
order and pre order traversals.