Jobs in India
Search Jobs
Search Jobs

Patni Computer Services( ) Sample Paper - Example Paper 11 by PCS

Details of Patni Computer Services( ) Sample Paper - Example Paper 11 by PCS conducted by PCS for job interview.
Share Us With Others
 Number of Weights needed for weighing 1 to 40 kgs?   27 9 3 1 ans : 4 

Venn diagram problem venndiagram find the   formulae. Ans. (AB+BC+CA)(A,+B,+C,) 

a +2b=6,ab=4 2/a + 1/b=?   ans : 3/2 

Age of 4 persons given in a relation find smallest age?   ans : meera

 find floating point result   (float)25/2, float(25/2), 25/(float)2 ,25/2  ans: 1 & 3 

find equivalent *(*(s+x)+y) ==> s[x][y]  ans : content of s[x][y]                   

find invalid statement : int a[3] 
  1. scanf("%d",a[2]); 
  2. scanf("%d",&a[2]); 
  3. scanf("%d",a); 
  4. all  
  ans : 1

One palindrome programme was given in recursion  ans : pal(f++,t--) 

main program: 
 i=foo(2) foo(int s) 
  { 
 if(!s) 
  return s; 
  else 
  { int i=5; return i} 
  } 
  ans : 5 

 k=0 i=0j=1; 
  if(i0)&&(k=2) printf(k); 
  if(i0|| k=0) 
 printf(k)  
 ans: 2 2

cube is moulded as a sphere. find the ratio of   cube of surface area of sphere to squareof surface area of cube. ans pi/6

Teacher in math=4 p6=3 kmistry=3 each can take 2  subject minimum teacher needed for school  ans : 5

3 vowels,4 consonents formulate string of 6  letters with a vowel in a string max no of string ?  ans: 5040

binnary of .6875.  0.1011                     

man walks at speed of 8 km/h 300 mtrs length train crosses man in 30  sec from back, find speed of train  ans: 44 km/hr 

 main() 
  { 
  char ch; 
  int count=0; 
  while((ch = getch() != ,\n,) 
  { 
  while (ch == , ,) 
  ch = getch(); 
 while((ch!=, ,) && (ch!=,.,)) 
  { 
  count++; 
 ch=getch(); 
  } 
  }  
  ans : 11 

Radius of a circle is 5cm , if we draw a  rectangle of maximum size,  what is the area of rectangle ans : 50 cmsq 

main() 
  { 
  int i; 
 for(i=0;i<3;i++) 
 switch(i) 
  { 
  case 1: printf("%d",i); 
  case 2 : printf("%d",i);                     
  default: printf("%d"i); 
  } 
  } 
  ans 011122 

There r 3 boys 7 4 girls; Howmany ways they r arranged such that boys should be always together ???Ans: 240

If n.....; What is the max no that divides  (Ans: 8)

A,B,C,D has values from 0 to 9.... What is D ?  (Ans: 6)

A wodden piece taken which is in shape of Triangle , of 10 X 24 X 26 ; Then cut at some ..... which is rearranged
in rectangle format; so what is ... (Ans: 5)

There r 5 numbers. The average is 25; the highest value excluded then average is 25, if the lowest is excluded the avg is ..Then average of remaining is ? (Ans: 30)

The square is cut such that the end point of one side is shown in fig.. This is repeated two times, what is the area ??
(Ans: 3.61)

The route problem... what is the shortest rout to p1 to p2... (There may be circle figure......) (Ans: From p1 to 0 & form 0 to p8)

Two motor cycles A & B are started from one point at 4 Kmph & 6 Kmph; After 45 min B starts returning , at what
time they will reach.... (Ans: 3.6 km)

All integer from 0 to 9, what is the smallest no perfectly devides; (Ans: c)

Some figure (Triangle in a rectangle)..... What is perimeter if triangle  (Ans: 20)

#include 
  /* This problem is given in PCS BOMBAY walk-in-interview.
  * What is the final value of i and how many times loop is
  * Executed ?
  */
 
  main()
 
  {
  int i,j,k,l,lc=0;
  /* the input is given as 1234 567 */
  printf("Enter the number string:<1234 567 >\n");    
 scanf("%2d%d%1d",&i,&j,&k);
 for(;k;k--,i++)
 for(l=0;l> printf("%d %d\n",i,l);}
 printf("LOOPS= %d\n", lc-1);
  }
  /* Ans: i = 17, and loop is executed for 169 times */

#include 
main()
  {
  func(1);
  }
  func(int i){
  static char *str[] ={ "One","Two","Three","Four"};
 printf("%s\n",str[i++]);
  return;
  }
  /* Ans:- it will give warning because str is pointer to the char but                          
  it is initialized with more values
  if it is not considered then the answer is Two */

#include 
  main()
  {
  int i;
  for (i=1;i<100; i++)
  printf("%d %0x\n",i,i);
  }
  /* Ans:- i is from 1 to 99 for the first format,
  for the second format 1to9, ato f, 10 to 19,1ato1f, 20 to 29, etc */ 

#include 
/* This problem was asked in PCS Bombay in a walk-in-interview
  * Write a recursive function that calculates
  * n * (n-1) * (n-2) * ....... 2 * 1
  */
 
  main() {
  int factorial(int n);
  int i,ans;
 printf("\n Enter a Number:");
 scanf("%d",&i);
  ans = factorial(i);
 printf("\nFactorial by recursion = %d\n", ans);
  }
  int factorial(int n)
  {
  if (n <= 1) return (1);
  else
  return ( n * factorial(n-1));
  }

#include 
  /* This problem is asked in PCS Bombay walk-in-interview                       
  * What is the output of the following problem
  */
  main(){
  int j,ans;
  j = 4;
  ans = count(4);
 printf("%d\n",ans);
  }
  int count(int i)
  {
  if ( i < 0) return(i);
  else
  return( count(i-2) + count(i-1));
  }
 
  /* It is showing -18 as an answer */ 

#include 
  /* This problem is given in PCS BOMBAY walk-in-interview.
  * What is the final value of i and how many times loop is
  * Executed ?
  */
 
  main()
 
  {
  int i,j,k,l,lc=0;
  /* the input is given as 1234 567 */
  printf("Enter the number string:<1234 567 >\n");
 scanf("%2d%d%1d",&i,&j,&k);
 for(;k;k--,i++)
 for(l=0;l> printf("%d %d\n",i,l);}
 printf("LOOPS= %d\n", lc-1);
  }
  /* Ans: i = 16, and loop is executed for 169 times */