Value Labs Candidate Experinces

Value Labs Candidate Experinces

On Mon, Aug 2, 2012 at 11:07 PM, Krishna Ghosh wrote

There were 25 questions to be solved in 1 hr.

5 were to be written on the answer sheets provided. They were
1.Write a c program to take a set of characters as input in ‘text’ and store it in another array of characters ‘backtext’.
2.Write a c program to open a file and write “valuelabs,Hyderabad” and save it before closing.
3.Wthe difference between malloc and calloc functions.
4.What is the difference between static memory allocation and dynamic memory allocation.
5. What is the advantage of using typedef?
1. A boy walks 90m towards east in search of his father and turns to his right,walks straight for 20 m and again turns to his right. he walks 30 m to reach his uncle’s place where he doesn’t find his father and hence moves 100m north where he finds his father. find the distance from the point he started.(this ques got repeated)
2.Two trains 225 km apart are traveling toward each other along the same track. Two trains have the same speed 75kmph. A bee is hovering just above the nose of the first train. It buzzes from the first train to the second train, turns around immediately, flies back to the first train, and turns around again. It goes on flying back and forth between the two trains until they collide. If the bee’s speed is twice the speed of two trains, how far will it travel?
there were no such english questions(analogies etc.)
there were some c questions:
1.How many characters can be taken as command line arguments?
2.find the output
int main(){
char c[20];
printf(“Str length:”,sizeof(c));
return 0;
void swap(int &i,int&j);
int main(){
int i=10,j=11;
printf(“%d %d”,i,j);
return 0;
void swap(int &i,int&j)

Leave a Reply0

Your email address will not be published.