GE Code Writing Test Questions

Tuesday, August 30, 2011 Posted by Sangram Nandkhile 0 comments










In this article will be about GE Round 2: Online Code Writing Test questions and GE placement pattern.

I had shared my GE experience in my last post i.e. GE Placement Pattern - MY Review.
I have received good feedback.
Please do comment and ask any queries you have.

Today, i am gonna write about the GE Round 2: i.e. Code writing problem.


If u have cleared the GE aptitude test,you will receive an Email from GE (within 10-15 days).
Email will be containing 3 attachments having one problem in each attachment.



Source: Real Email shared by Mr. Harshad Kambale (RAIT BE Comps 2010)

________________________________________________________________________

Hi,
Congratulations,
You have been shortlisted from the Aptitude/Technical Test, which was held last Saturday, 17th April, 2010. You need to solve code writing problem given below, as per the responses received we will call you in our GE office next week from 28th onwards for recruitment process.
This mail is w.r.t. for the challenging positions for software professionals, currently available with GE in Mumbai.
Attached to this mail is a program that we expect you to solve and reply before Friday April, before 9.00 p.m.

Rules:
    • Please solve it on your own/submit your own solution. You may be asked to build an extension to this program or an advanced variant of this type of problem in person in the future.
    • You may implement the program in either C/C++/C#/VB.Net/Java. If you choose to use C or C++ please mention the compiler version that you’re using in an email.
    • Submit your source code as a single file as an email attachment (Do not compress it to zip/archive format). We would compile your program into an executable and run it (e.g. c:\>SomeName.exe TestCases.txt)
    • The program will not expect any user input. Please test your program for compile / run time errors before submitting.
You may submit multiple submissions – strive for solutions that are elegant, memory and time efficient.Positions:
Openings exist at Lead Software Engineer , Software Engineer , and QA / Test Engineer levels with the Software Solutions Group of GE Energy in Mumbai and Hyderabad . The Software Solutions Group (SSG) , has been set up to provide advanced software solutions, based on SOA, C++/DCOM,.NET, Test Automation, Decision Support and Optimization technologies to monitor, protect, control, and validate the safety of critical industrial assets, processes and applications. SSG has development centers in Mumbai, Hyderabad in India, Minden , Norfolk, Atlanta, Melbourne in the US and Cambridge in UK and follow a global, unified set of processes, standards, methodologies and software lifecycle tools.
Compensation and Benefits: A competitive Compensation and Benefits package includes Basic, HRA, LTA, Provident Fund, Gratuity, Group Medical Insurance, Paid leave , Life and Accident cover, Employee Share Purchase, Lunch Subsidy reimburesment of medical and professional development expenses *. The company has very strong Reward and Recognition, Employee Education Support , eLearning , referal bonus and leadership training programs. New employees are eligible for relocation assistance.
A culture of meritocracy with strong appraisal processes, ensures outstanding employees are rewarded aggressively and groomed for leadership across the business.
About GE: General Electric Company, USA , is a diversified technology, services and manufacturing company with over 300, 000 + employees in 100+ countries. GE has been consistently ranked amongst most admired and innovative companies in the world. GE is renowned for its culture and record of innovation, performance, goveranance and leadership development. GE invests about a $1 billion annually on education and training programs for its employees with over 2.9 million course completions.
Details about the vacancy:
    The Job: Development and Sustenance of our world class products. These products boast of client server architectures, run 24x7 and are primarily based on Microsoft technologies using VC++ \ C# as the development platform. The job is based in SEEPZ/Hiranandani, Mumbai .
    Candidate Profile: Excellent communications skills, clear analytical thinking, penchant for problem solving, thirst for knowledge coupled with high learnability, capable of working under minimal supervision, must be a graduate in any discipline and should have a good understanding of OO concepts coupled with experience in C++,/.net./Java and Test Automation.
Please do not change the subject line while replying.
Reply to <geii.careers.mumbai@ge.com>
Sincerely,
GE India Industrial Pvt. Ltd.
Human Resources
www.ge.com

geii.careers.mumbai@ge.com


________________________________________________________________________

Problem No. 1
PRIME NUMBERS
Express a given number as a summation of 4 positive primes.
Time limit of execution is 3.00 seconds.

Implement method/function which follows given signatures :

For Cpp:


void prime_sum(int n,int sol[ ]);


The input contains one integer number N (N<=100000). This number you will have to express as a summation of 4 primes and an array of interger where you have to store all 4 numbers.
If summation is not possible then just fill first 4 entries of array as -1.


For C Sharp :


public int[ ] prime_sum(int n);


The input contains one integer number N (N<=100000). This number you will have to express as a summation of 4 primes.

Your method should return an array containing 4 prime no.
If given no can not be expressed in expected form then it should return null value.

Sample Input :

28

42

Sample Output:

7 11 3 7

7 11 17 7




Problem No. 2
Adding two numbers:


"Write a function/class to add two integers."

You have to design only function/method to accept two integers and return back their sum. Your function must follow following
Prototype.

For C ++ :

int addno(int ,int);

For C Sharp :

public int addno(int,int);

2. Solving The problem :

For above example :

For C++ :

just enter ,

int addno(int a,int b)
{
return (a+b);
}



For C Sharp :

just enter :

public int addno(int a,int b)
{
return (a+b);
}

What NOT to enter :

* Header files
* Include statement
* Printing statement
* Anything that will generate Exceptions .


Basically anything But the above structure should not be entered in that area.


Problem No. 3

Expression Evaluation

Consider a pseudo code which takes following expression as input and produces given outputs.

Input Output

[ 0 ] 0
[ 1 ] 1
[ 0, 1 ] 1
[ 1, 1 ] 2
[ 1, [ 1, 2 ] ] -2
[ 1, 2, [ 8 ] ] -5
[ 1, [ 2 ], [ 3 ] ] -4
[ 9, [ 3, 4, [ [ 2 ] ] ] ] 0

Design a function/methos to implement above pseudo code by following prototype as

For CPP :

int ExpressEval(char * expression);

For C Sharp :

public int ExpressEval(string expression);

Input:

Accept expression to be evaluated as a string.

Output :

Return result of evaluation as an integer.

For e.g

consider input string to be "[1, 2 , [5 , 3 ] ]"

then your function must return -5.

Just design above method do not implement entire program/class.
That's IT...
Read the mail and you will understand the steps to be followed.

Labels:

Cisco Placement Paper Pattern GD, HR and Technical Interviews

Posted by Sangram Nandkhile 0 comments










Cisco Placement Papers,GD, HR and Technical Interviews

Take alook at the current and lastest Cisco Placement Papers

Section 1: Test (Aptitude + Technical Test)
Section 2: Technical Interview
Section 3: HR Interview



Overview:

Section 1: Aptitude Test

1. C language
2. java questions
3. Networking questions
4. Aptitude test (quant)


Section 2: Technical Interview
This is interview would be difficult to crack and be ready to face all the basic and fundamental questions.

Section 3: HR Interview
If you could clear section1 and 2, hr interview would be just a piece of cake. its simple and basic interview questions will be asked.

Labels:

Latest Electronic Arts Placement Paper Pattern ,Latest Electronic Arts campus test Paper ,Electronic Arts GD Interview,Electronic Arts Aptitude Papers,Electronic Arts Placement Paper - 2011

Wednesday, August 3, 2011 Posted by Sangram Nandkhile 0 comments










Latest Electronic Arts Placement  Paper Pattern ,Latest Electronic Arts campus test Paper ,Electronic Arts GD Interview,Electronic Arts Aptitude Papers,Electronic Arts Placement Paper - 2011
Electronic Arts Placement Papers Questions, GD and Interview

About Electronic Arts

Electronic Arts is a biggest gaming company in the usa as well as world. Electronic Arts is also know as EA and it is well established all over the world.


Trip Hawkins, the founder and the owner of the EA. Software Revenues of EA is about 4,268 Millions USD.

EA is looking for developers,designers and QA testers who are passionate about gaming. Their basic criteria for choosing candidates is should be a hardcore gamer and should love gaming. Expect candidate should be updated about latest games, technologies used etc.

Electronic Arts aptitude test pattern

Section 1: Aptitude Test (quantitative)
Section 2: Aptitude Test (Verbal)
Section 3: Gaming test (gaming general knowledge)

Overview

Section 1: Aptitude Test (quantitative)15 Questions
Sample Questions:

3, 6, 11, 18, ?

17, 18, 19, 34, 35, 19, 20, ? ans: 21

?, 19, 23, 29, 31 Options:12 15 16 17 18 

Mathematical questions like 

2x+3y=13
4x+2y=14, find x and y

Odd man out from the given options.
 

Section 2: Aptitude Test (Verbal) 15 Questions
 
Passage and questions asked on the passages.
 
Section 3: Gaming test (gaming general knowledge)

General knowledge questions about Gaming companies,CEO's,technologies, game characters,game versions, supported graphic cards, hardware used etc.




Labels:

Latest Wipro Paper Pattern ,Latest Wipro Paper ,Wipro GD Interview,Wipro Aptitude Papers,Wipro Placement Paper,HR and Technical Interview,

Posted by Sangram Nandkhile 0 comments










Latest Wipro Paper Pattern ,Latest Wipro Paper ,Wipro GD Interview,Wipro Aptitude Papers,Wipro Placement Paper - 2011
Wipro Aptitude test, GD, HR and Technical Interview 


About Wipro


Wipro is considered to be one of the famous MNC. Its is well establoshed in various fields and all over the world.Founder of the Wipro is an india, Mr. Azim Premjee.

Wipro IT sector is also well developed and had many clients all over the world like US,UK,many other European countries, Gulf etc.
  
Wipro Aptitude test

Section 1: Aptitude Test (quantitative)
Section 2: Aptitude Test (Verbal)
Section 3: Technical test


Section 1: Aptitude Test (quant) has 15 questions in it

RS Aggarwal is good book for wipro test. Section 1 is easy to solve.
River, boat problems, age problems, ration questions,matrix problems were asked,

Section 2: Aptitude Test (Verbal) has 15 questions in it,

Its easy too, analogy,grammar, paragraph and answers were asked.

Section 3: Technical Test has 20 questions in it,

This all are logical questions, loops for,if ,if else,
OOPS concepts,call by value ,call by reference.
 

Labels:

Mastek Technical-aptitude test questions LIST NO. 1, Latest Mastek aptitude Placement Papers

Wednesday, July 6, 2011 Posted by Sangram Nandkhile 0 comments










Mastek Technical-aptitude test questions LIST NO. 1


Hi Readers,
You must have seem Mastek's overall placement Pattern in my last article, that was Mastek Aptitude test Paper Pattern-My review

They will be focusing on the Technical questions so i have googled some technical questions for you and i will be posting in this post.

I wont say these are the same questions i had seen in mastek but they are quite similar.
So i will request you to take a look at it.

Mastek Technical-aptitude test questions LIST NO. 1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Answers are marked in RED.
/*question number 1*/

int z,x=5,y=-10,a=4,b=2; 
z = x++ - --y * b / a;
What number will z in the sample code above contain?
Choice 1
5
Choice 2
6
Choice 3
10 [Ans]
Choice 4
11
Choice 5
12
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/*question number 2*/
With every use of a memory allocation function, what function should be used to release allocated memory which is no longer needed?
Choice 1
unalloc()
Choice 2
dropmem()
Choice 3
dealloc()
Choice 4
release()
Choice 5
free() [Ans]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/*question number 3*/
Code:
void *ptr;
myStruct myArray[10];
ptr = myArray;
Which of the following is the correct way to increment the variable "ptr"?
Choice 1
ptr = ptr + sizeof(myStruct); [Ans]
Choice 2
++(int*)ptr;
Choice 3
ptr = ptr + sizeof(myArray);
Choice 4
increment(ptr);
Choice 5
ptr = ptr + sizeof(ptr);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/*question number 4*/
Code:
char* myFunc (char *ptr)
{
 ptr += 3;
 return (ptr);
} 
int main()
{
 char *x, *y;
 x = "HELLO";
 y = myFunc (x);
 printf ("y = %s \n", y);
 return 0;
}
What will print when the sample code above is executed?
Choice 1
y = HELLO
Choice 2
y = ELLO
Choice 3
y = LLO
Choice 4
y = LO [Ans]
Choice 5
x = O
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/*question number 5*/
Code:
struct node *nPtr, *sPtr;    /* pointers for a linked list. */ 
for (nPtr=sPtr; nPtr; nPtr=nPtr->next)
{    
 free(nPtr);
}
The sample code above releases memory from a linked list. Which of the choices below accurately describes how it will work?
Choice 1
It will work correctly since the for loop covers the entire list.
Choice 2
It may fail since each node "nPtr" is freed before its next address can be accessed.
Choice 3
In the for loop, the assignment "nPtr=nPtr->next" should be changed to "nPtr=nPtr.next".
Choice 4
This is invalid syntax for freeing memory.
Choice 5
The loop will never end.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/*question number 6*/
What function will read a specified number of elements from a file?
Choice 1
fileread()
Choice 2
getline()
Choice 3
readfile()
Choice 4
fread()
Choice 5
gets()
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/*question number 7*/
"My salary was increased by 15%!"
Select the statement which will EXACTLY reproduce the line of text above.
Choice 1
printf("\"My salary was increased by 15/%\!\"\n");
Choice 2
printf("My salary was increased by 15%!\n");
Choice 3
printf("My salary was increased by 15'%'!\n");
Choice 4
printf("\"My salary was increased by 15%%!\"\n");[Ans]
Choice 5
printf("\"My salary was increased by 15'%'!\"\n");
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/*question number 8*/
What is a difference between a declaration and a definition of a variable?
Choice 1
Both can occur multiple times, but a declaration must occur first.
Choice 2
There is no difference between them.
Choice 3
A definition occurs once, but a declaration may occur many times.
Choice 4
A declaration occurs once, but a definition may occur many times. [Ans]
Choice 5
Both can occur multiple times, but a definition must occur first.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/*question number 9*/
int testarray[3][2][2] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
What value does testarray[2][1][0] in the sample code above contain?
Choice 1
3
Choice 2
5
Choice 3
7
Choice 4
9
Choice 5
11[Ans]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/*question number 10*/
Code:
int a=10,b;
b=a++ + ++a;
printf("%d,%d,%d,%d",b,a++,a,++a);
what will be the output when following code is executed
Choice 1
12,10,11,13
Choice 2
22,10,11,13
Choice 3
22,11,11,11
Choice 4
12,11,11,11
Choice 5
22,13,13,13[Ans]


 Hope This helps.

Incoming search items:

  • Mastek Aptitude test Paper Pattern 
  • Latest Mastek Placement Papers
  • Mastek Pattern- 2011-2012

Labels:

Mastek Aptitude test Paper Pattern - Latest Mastek Placement Papers- Mastek Pattern- 2011-2012

Tuesday, July 5, 2011 Posted by Sangram Nandkhile 0 comments










Mastek Aptitude test Paper Pattern - 
Latest Mastek Placement Papers- 
Mastek Interview Pattern- 2011-2012

Hi guys,

Mastek can be great company to start your career but getting into mastek is difficult task freshers.I had tried for Mastek in last year in July 2010.

Let me tell you the overall pattern first.



Mastek Placement Drive Pattern:

i. Technical (70%)+ Aptitude test(30%)
ii. Technical Interview
iii.HR Interview

Technical + Aptitude test
 
Mastek always needs some good technical oriented brains (unlike Infosys )..so its but obvious for us to understand they are mainly focusing on the Technical part:
Major part was technical , i would say around (70% questions ) and 30 %  part was  aptitude test.

Every question has 4 or 5 options:
Technical part was on c,c++.
They give small snippets of codes of c,c++ and we need to find the Output of the code or to decide which is the right code from all the 4 options.  

Even if they don't mention but there will be sectional cut off.


You can expect questions on:
  • call by value
  • Call by reference
  • Inheritance
  • Loops with iteration over 100 loops( to find the outputs)
  • other OOPS concept
Please Google It for such questions..

Aptitude test was easy..please check Links shared at the end of the Post  for aptitude test.

Hope this will help you all in understanding the mastek placement pattern. 
I will be posting the questions similar  to mastek  in the next article.


All the best.


  SearchItems: 

Mastek placement papers 2011 , 
Download Mastek Placement papers.

Labels: ,

Quinnox Aptitude test Paper Pattern - Latest Quinnox Placement Papers- Quinnox Pattern- 2011-2012

Monday, June 13, 2011 Posted by Sangram Nandkhile 0 comments










Quinnox Aptitude test Paper Pattern - Latest Quinnox Placement Papers- Quinnox Pattern- 2011-2012

Quinnox aptitude test

Hi Readers,

In this article i will be writing about the Quinnox Consultancy Services.
I would like to tell you that i had taken part in Quinnox placement drive 2010 and i was one of the candidates who were selected by Quinnox consultancy services.

Quinnox is one of the emerging MNC located at Mumbai, Pune, Bengaluru, USA, UK and France.I was called for an interview at the Seepz, Andheri,Mumbai office and it lasted for around 90-100 minutes. :-)

Lets see the overall placement drive pattern.

I.Aptitude test (Its a Pool campus so aptitude test is conducted in one of the engineering colleges)

II.Basic HR Interview (will be conducted on the same day after the Aptitude test)

III.Technical Interview (quinnox office)

IV.HR interview


Quinnox offered me 2.35 LPA last year, so you can expect 2.6LPA this year, as per the market conditions.
But if they ain't offering.....You cant do anything.. :-) Anyways..Lets move on..


I.Aptitude test

There were 75 Questions divided in the 5 sections.But roughly it was divided in the 2 main sections.
section I. Aptitude (logical reasoning + analogy etc etc)
Sectin II. English / verbal

Things you need to remember---->>>
  • Question paper was mainly on the aptitude,logical section containing around 50 question.
  • Verbal section had 1 /2 passages and few extra questions in it.
  • Paper was damn easy but you just need be quick in solving questions
  • NO NO NO negative marking.
  • Leave the question if you cant solve in 1 minute, you don't want to miss 5 easy questions for 1 tough questions. Right ??? :P
  • You need to encircle or fill the correct options on the answer sheet. Be careful while doing that.
VERY VERY IMPORTANT thing about the aptitude test is most of the questions were based on series questions. I have given some of the Series questions below.
Please practice all of them before going for the test.


Questions---->>>
  • Roughly there were around 25 questions on the series.
  • 5-6 matrix questions
  • 2 English passages having 5 questions each.
  • Age problems ( ex. Anita's age was 4 times of her daughter's age ...
  • Analogy Problems.
  • Puzzles like :What does news stand for ? ans: North East West South
  • Cut off would be around 50%

I would like to post few questions for you all so all can practice.
These are very SIMILAR questions.

1. 4, 8, 16, 32, ? Options:48 64 40 46 44
2. 4, 8, 12, 20, ? Options:32 34 36 38 40
3. 54, 49, ?, 39, 34 Options:47 44 45 46 42
4. ?, 19, 23, 29, 31 Options:12 15 16 17 18
5. 3, 6, 11, 18, ? Options:30 22 27 29 31
6. 48, 46, 42, 38, ? Options:32 30 33 34 35
7. 4, 3, 5, 9, 12, 17, ? Options:32 30 24 26 22
8. 5, 6, 7, 8, 10, 11, 14, ?, Options:19 17 15 16 21
9. 1, ?, 4, 7, 7, 8, 10, 9, ? Options:3 11 13 12
10. 17, 18, 19, 34, 35, 19, 20, ? ans: 21


Matrix problems:

2 | 5 | 11
________
4 | 3 | 13
________
6 | 2 | ?

ans: 13 ; 6x2+1=13


2 | 3| 8
________
3| 4 | ?
________
4 | 2| 16


ans: 3^4 = 81;

You can expect similar questions.

Overall, the test was very easy but keep the points which i have mentioned in your mind.

In next article, I will post about the HR and Technical interview in my next article.
Keep visiting.

All the best.

GE Placement Pattern Round 2:Code writing problem

Monday, May 16, 2011 Posted by Sangram Nandkhile 0 comments










GE Placement Pattern Round 2:
Code writing problem


Hi Readers,

I had shared my GE experience in my last post i.e. GE Placement Pattern - MY Review.
I have received good feedback.
Please do comment and ask any queries you have.

Today, i am gonna write about the GE Round 2: i.e. writing problem.


If u have cleared the GE aptitude test,you will receive an Email from GE (within 10-15 days).
Email will be containing 3 attachments having one problem in each attachment.




Check out the Email format...

Source: Real Email shared by Mr. Harshad Kambale (RAIT BE Comps 2010)

________________________________________________________________________

Hi,
Congratulations,
You have been shortlisted from the Aptitude/Technical Test, which was held last Saturday, 17th April, 2010. You need to solve code writing problem given below, as per the responses received we will call you in our GE office next week from 28th onwards for recruitment process.
This mail is w.r.t. for the challenging positions for software professionals, currently available with GE in Mumbai.
Attached to this mail is a program that we expect you to solve and reply before Friday April, before 9.00 p.m.

Rules:
    • Please solve it on your own/submit your own solution. You may be asked to build an extension to this program or an advanced variant of this type of problem in person in the future.
    • You may implement the program in either C/C++/C#/VB.Net/Java. If you choose to use C or C++ please mention the compiler version that you’re using in an email.
    • Submit your source code as a single file as an email attachment (Do not compress it to zip/archive format). We would compile your program into an executable and run it (e.g. c:\>SomeName.exe TestCases.txt)
    • The program will not expect any user input. Please test your program for compile / run time errors before submitting.
You may submit multiple submissions – strive for solutions that are elegant, memory and time efficient.
Positions:
Openings exist at Lead Software Engineer , Software Engineer , and QA / Test Engineer levels with the Software Solutions Group of GE Energy in Mumbai and Hyderabad . The Software Solutions Group (SSG) , has been set up to provide advanced software solutions, based on SOA, C++/DCOM,.NET, Test Automation, Decision Support and Optimization technologies to monitor, protect, control, and validate the safety of critical industrial assets, processes and applications. SSG has development centers in Mumbai, Hyderabad in India, Minden , Norfolk, Atlanta, Melbourne in the US and Cambridge in UK and follow a global, unified set of processes, standards, methodologies and software lifecycle tools.
Compensation and Benefits: A competitive Compensation and Benefits package includes Basic, HRA, LTA, Provident Fund, Gratuity, Group Medical Insurance, Paid leave , Life and Accident cover, Employee Share Purchase, Lunch Subsidy reimburesment of medical and professional development expenses *. The company has very strong Reward and Recognition, Employee Education Support , eLearning , referal bonus and leadership training programs. New employees are eligible for relocation assistance.
A culture of meritocracy with strong appraisal processes, ensures outstanding employees are rewarded aggressively and groomed for leadership across the business.
About GE: General Electric Company, USA , is a diversified technology, services and manufacturing company with over 300, 000 + employees in 100+ countries. GE has been consistently ranked amongst most admired and innovative companies in the world. GE is renowned for its culture and record of innovation, performance, goveranance and leadership development. GE invests about a $1 billion annually on education and training programs for its employees with over 2.9 million course completions.
Details about the vacancy:
    The Job: Development and Sustenance of our world class products. These products boast of client server architectures, run 24x7 and are primarily based on Microsoft technologies using VC++ \ C# as the development platform. The job is based in SEEPZ/Hiranandani, Mumbai .
    Candidate Profile: Excellent communications skills, clear analytical thinking, penchant for problem solving, thirst for knowledge coupled with high learnability, capable of working under minimal supervision, must be a graduate in any discipline and should have a good understanding of OO concepts coupled with experience in C++,/.net./Java and Test Automation.
Please do not change the subject line while replying.
Reply to <geii.careers.mumbai@ge.com>
Sincerely,
GE India Industrial Pvt. Ltd.
Human Resources
www.ge.com

geii.careers.mumbai@ge.com



________________________________________________________________________

Problem No. 1

PRIME NUMBERS

Express a given number as a summation of 4 positive primes.
Time limit of execution is 3.00 seconds.

Implement method/function which follows given signatures :

For Cpp:


void prime_sum(int n,int sol[ ]);


The input contains one integer number N (N<=100000). This number you will have to express as a summation of 4 primes and an array of interger where you have to store all 4 numbers.
If summation is not possible then just fill first 4 entries of array as -1.


For C Sharp :


public int[ ] prime_sum(int n);


The input contains one integer number N (N<=100000). This number you will have to express as a summation of 4 primes.

Your method should return an array containing 4 prime no.
If given no can not be expressed in expected form then it should return null value.

Sample Input :

28

42

Sample Output:

7 11 3 7

7 11 17 7





Problem No. 2

Adding two numbers:


"Write a function/class to add two integers."

You have to design only function/method to accept two integers and return back their sum. Your function must follow following
Prototype.

For C ++ :

int addno(int ,int);

For C Sharp :

public int addno(int,int);

2. Solving The problem :

For above example :

For C++ :

just enter ,

int addno(int a,int b)
{
return (a+b);
}



For C Sharp :

just enter :

public int addno(int a,int b)
{
return (a+b);
}

What NOT to enter :

* Header files
* Include statement
* Printing statement
* Anything that will generate Exceptions .


Basically anything But the above structure should not be entered in that area.


Problem No. 3

Expression Evaluation

Consider a pseudo code which takes following expression as input and produces given outputs.

Input Output

[ 0 ] 0
[ 1 ] 1
[ 0, 1 ] 1
[ 1, 1 ] 2
[ 1, [ 1, 2 ] ] -2
[ 1, 2, [ 8 ] ] -5
[ 1, [ 2 ], [ 3 ] ] -4
[ 9, [ 3, 4, [ [ 2 ] ] ] ] 0

Design a function/methos to implement above pseudo code by following prototype as

For CPP :

int ExpressEval(char * expression);

For C Sharp :

public int ExpressEval(string expression);

Input:

Accept expression to be evaluated as a string.

Output :

Return result of evaluation as an integer.

For e.g

consider input string to be "[1, 2 , [5 , 3 ] ]"

then your function must return -5.

Just design above method do not implement entire program/class.

That's IT...

Read the mail and you will understand the steps to be followed.


So anybody who has cleared the aptitude test,please refer these Problems...
I will try to post the solution in next few days.

So, keep visiting the

Placement Papers for Engineers !!!



:-)
Good luck.

Post By




Sangram Nandkhile

Labels:
Related Posts Plugin for WordPress, Blogger...
 

Like Us

Alexa

Followers