dss.chandra
BAN USER
Comments (5)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
sizeof (char* type){
void *p;
map <char[ ], int> my_map ;
my_map["int"] = 1;
my_map["char"] = 2
my_map["float"] = 3;
.
.
.
switch(my_map[type]){
case 1 :
{
p = (int*) malloc(1);
return ((int*) &(p+1) - (int*) &p) ;
}
case 2 :
{
p = (char*) malloc(1);
return ((char*) &(p+1) - (char*) &p);
}
.
.
.
.
and so on
}
Comment hidden because of low score. Click to expand.
0
of 0 vote
Error() Function returning an address.. is wrong....
The main function (calling function) will fail at runtime because buf goes out of scope , after error () function returns
Comment hidden because of low score. Click to expand.
0
of 0 vote
// pseudo code
Queue Size = 3;
for (i=0; i< N; i++){
if (arr[i] > queue.rear)
queue.insert(a[i]);
}
third_biggest = queue.front;
Comment hidden because of low score. Click to expand.
0
of 0 vote
Do +'1' - '0'
- dss.chandra April 08, 2011Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
http://stackoverflow.com/questions/3250957/finding-the-largest-palindrome-of-the-product-of-two-three-digit-numbers-problem
- dss.chandra March 10, 2012