Placement Papers for All Companies

3i infotech
Abacus Infotech
Abatix
Abaxis
ABB
ACC Limited
Accel Frontline
Accenture
Aditi Technologies
Adobe System
ADP
Agilysys
AgreeYa
AIG
AirNet
Alanco Technologies
Alle Technologies
Allfon
Alter Systems
Amazon
AMDL
Amdocs
AMI
Amiti Software Technologies
ANZ
Apple
Applied Materials
Apps Associates
Aricent
ASDC
Ashok Leyland Ltd
Asian Paints
Aspire System
AT & T
Atlas Copco
Atos Origin
AXA Technology Services
Axes Technology
Bain
Bajaj
Bayer
Bharti Airtel Ltd
Bhawan Cybertek
Birlasoft
Blue Star Infotech
BMC
BOB
Brakes India
C-DOT
CA Technologies
Cadence
Calsoft
Canarys
Capgemini
Caterpillar
Celstream
CGI Group
Changepond Technologies
Cimtrix Systems
Cisco system
Citicorp Overseas Software Ltd
ClinTech
CMC Limited
CMS
Cognizant
Compaq
Consagous Technologies
Convergys
CORDYS
CRISIL
Crompton Greaves
CSC
CSFB
CtrlS Datacenters Ltd
Cummins
Cyient
Daffodil
Daimler
Dell
Deloitte
Delphi-TVS
Dharma Systems
Directi
DSRC
Eicher
ELGI
ELICO
EMC Corporation
Emphasis
Ericsson
Ernst & Young
ESKO
Essar
Facebook
Fanuc Corporation
Fidelity
Flextronics
Flipkart
Freescale
Fujitsu
Gajshield
GE
Genpact India
Geodesic
Geometric Limited
GlobalEdge
GlobalLogic
GMR Group
Godrej Infotech
Google
Grapecity
Harita - TVS
HCL
HCL Technologies
Headstrong
Healthasyst
HEC Ltd
Hexaware
HFCL
Holool
Honeywell
HP
HTC Global Services
Huawei
Hughes
Hyundai
IBM
IBS Software Services
IGate
Ikanos
IKOS
Impetus
iNautix
Indecomm
IndiaBulls Power Limited
Inductis-EXL
Industrial Alliance
Infineon
Infogain
Infosys
Intec
Integra
Intel
Intergraph
ITC Infotech
Jindal Steel and Power Limited
KPIT
L & T
L & T Infotech
LG Soft
Linde India Ltd
LnT Emsys
LnT-ECC
Lucas - TVS
Mahindra Engineering Services Ltd
Mahindra Ltd
Maruti
Matrix
Maveric Systems
McAfee
Microland
Microsoft
Mindtree
Miraclesoft
MKCL
Motorola
Mu-Sigma
Nagarro
NASSCOM
NCR Corporation
Ness Technologies
Neudesic
NIIT Technologies
Novell
Nvidia
Oracle
Persistent
Philips
Planetasia
Polaris
Poornam Info Vision
PSI Data Systems Limited
Quest-Global
Quinnox
R Systems
Redpine
Reliance Energy
Robert Bosch
RS Software
Samsung
SAP labs India
Sapient
Sasken Communications
Schneider India
Serco
Siemens
Sierra Atlantic
SkyTECH
Soliton
Sonata Software
Sony India
SQL Star
Steria
Subex Limited
Sutherland Global Services
Syntel
Talisma
Tata motors
Tata technologies
Tata-ELXSI
TCE
TCS
Tech Mahindra
Temenos
Tesco
Texas Instruments
Thermax
ThoughtWorks
Torry Harris
Triad
Trianz
Trilogy
TVS Motor
Unisys
UnitedHealth Group
UST Global
UTC Aerospace System
Valuelabs
Vedanta
Verifone
Verizon
Virtusa
Vision Infotech
Vizual
VMware
Wipro
Yahoo
YASH Technologies
Zenith
Zensar Technologies
ZTE

Sasken Communications Technical Questions 07 June 2010

Posted on :23-03-2016


Q1. 

#include
int main()
{
 
enum Peoplevar1 {Alex=0,    Tracy,  Kristian} Girls;
enum Peoplevar2 {William=0, Martin }  Boys;
switch (Boys)
{
case William:
puts("William");
break;
 
case Martin:
puts("Martin");
break;
 
default:
break;
}
return 0;
}
 
         1. Martin
2. Compiler error
3. Runtime error
4. William
 
 
 Q2. 

#include
union u
{
int var;
unsigned char str[4];
};
int main()
{
unsigned char tmp;
union u uObj;uObj.var = 3;
tmp = uObj.str[1];
uObj.str[1] = uObj.str[0];
uObj.str[0] = tmp;
printf("%d", uObj.var);
return 0;
}
 
1. 3
2. 768
3. Runtime crash
4. 876 

 
 Q3. An entire structure variable can be assigned to another structure variable if __________
           
 
1. the two variables have the same composition
2. the two variables are of same type
3. assignment of one structure variable to another is not possible
4. None of these

 
Q4. What will be the output of the following program  ?
 
#include
#define size 3
enum{a,b,c,d,e};
int main()
{
const cValue[2];
long lValue[size];
signed sValue[e];
printf("%d",sizeof cValue+sizeof lValue+sizeof sValue);
return 0;
}
 
1. Compiler error
2. 45
3. 36
4. 20

 
Q5. What will be the output of the following program?
 
#include
enum myEnum { AB, BC };
int main()
{
enum myEnum a =10;
printf("%d", a);
return 0;
}
 
           
1. Compiler error
2. 1
3. 10
4. 0
 
 
Q6

#include
int main( )
{
 struct a
 {
 category : 5 ;
scheme : 4 ;
} ;
printf ( "size = %d", sizeof ( struct a ) ) ;
return 0;
}
 
           
         1. size = 0
2. size = 1
3. size = 4
4. Compiler error
 
 
Q7. Consider following code snippet:
 
#include
int main( )
{
    int i = 5 , j = 2 ;
    fun ( &i, &j ) ;
    printf ( " %d %d", i, j ) ;
    return 0;
}
 
Q8. Which of the following option is correct about function fun( ) so that value of i and j becomes 25 & 4?
           
 
1. void fun ( int i , int j )
{
    i = i * i ;
    j = j * j ;
}
 
           
 
2. void fun ( int &i , int &j )
{
    i = i * i ;
    j = j * j ;
}
 
           
 
3. void fun ( int *i , int *j )
{
    *i = *i * *i ;
    *j = *j * *j ;
}
 
           
 
4. void fun ( int *i , int *j )
{
    i = i * i ;
    j = j * j ;
}
 
 
Q9. What will be the output of the following program?
 
#include
int function(int i)
{   
    if(i<=1)
    return 1;
    if(i%2==0)
          return function(i/2);
    else
         return function((i-1)/2);
}
int main()
{
   extern int  function(int);
   int i;
   i = function(5);
   printf("%d",i);
   return 0;
}
 
           
1. Compiler error
2. 2
3. 0
4. 1
 
 
Q10. What will the following program print?
 
#include
 
int main(void)
{
    unsigned int c;
    unsigned x=0x3;
    scanf("%u",&c);
    switch(c&x)
    {
         case 3: printf("Hello! ");
         case 2: printf("Welcome ");
         case 1: printf("To All ");
         default:printf(" ");
    }
    return 0;
}
           
 
1. It will Print Hello
2. Runtime error
3. Compiler error
4. No output
 
 
Q11. What will be the output of the following program?
 
void main( )
{
    int i = 138, a = 138, k ;
    k = fun ( !++i, !++a ) ;
    printf ( "%d %d %d", i, a, k ) ;
}
 
fun( int j, int b )
{
    int c ;
    c = j + b ;
    return ( c ) ;
}
 
           
 
1. 138 138 276
2. 138 138 0
3. 139 139 276
4. 139 139 0
 
 
Q12. What will be the output of the following program?
 
#include
int main()
{
int iaddr;
for(iaddr=0;iaddr<3;iaddr++)
{
    int iaddr=100;
    iaddr--;
    printf("%d..",iaddr);
}
return 0;
}
 
         1. 99..99..99..
2. 0..1..2.
3. 100..100..100..
4. 99..98..97.
 
 
Q13. What will be the output of the following program?
 
#include
int main()
{
      char a[5][5],flag;
      a[0][0]=A;
      flag=((a==*a)&&(*a==a[0]));
      printf("%d ",flag);
      return 0;   
}
           
 
1. Runtime error
2. Compiler error
3. 1
4. 0

 
 Q14. What will be the output of the following program?
 
#include
#define a 5
void foo();
int main()
{
     printf("%d..",a); 
     foo(); 
     printf("%d",a);
     return 0;
}
void foo()
      #undef a
      #define a 50
}
 
     
Q15. What will be the output of the following program?
 
volatile int i;
main()
{       
    i = 8<10&1&&10>8;
    i<<2;
    printf("%d",i);
}
 
         1. 1
2. 0
3. 4
4. None of these
 

Q16. What would be the output of the following program?
 
main()
{       
    int i = 10;
    goto label2;
    while(i)
    {
        switch(i-1)
        {
             case 1:
                 label2:
            printf("%d", i);
        }
    }
    printf("%s", "hello");
    getch();
}
 
         1. Infinite loop
2. 10 hello
3. Compiler error
4. hello

 
Q17

#include
int main()
{
  const char *callCausal();
  *callCausal()=A;
  return 0;
}
 
const char *callCausal()
{
  return "Causal Call";
}
 
         1. No errors
2. Syntax error
3. callCausal() returns a constant string pointer which cannot be modified
4. None of these
 
 
 
Q18. What will be the output of the following program?
 
#include
char* func()
{
    char str[10] = "Take Care";
    return str;
}
int main()
{
    char* str1 = func();
    printf("%s", str1);
    return 0;
}
 
         1. Take Care
2. Compiler error
3. Undefined value
4. None of these
 
 
Q19. What will be the output of the following program?
         
         #include
int main()
{
   int var1,var2,var3,minmax;
   var1=5;
   var2=5;
   var3=6;
   minmax=(var1>var2)?(var1>var3)?var1:var3:(var2>var1);
   printf("%d ",minmax);
   return 0;
}
 
         1. 0
2. 5
3. 6
4. None of these
 
 
 Q20. Consider following code snippet:
 
#include
int main( )
{
FILE *fp, *fs, *ft ;
fp = fopen ( "A.C", "r" ) ;
fs = fopen ( "B.C", "r" ) ;
ft = fopen ( "C.C", "r" ) ;
fclose ( fp, fs, ft ) ;
return 0;
}
 
Q21. Which one of the following files gets closed?

         1.Only A.C
2.Only A.C and B.C
3.Error: “Undeclared identifier fclose( ) function”
4.All the three files
 
 
 
Q22. What will be the output of the following program?
 
#include
 
char *strrev(char *s,int n)
{
int i=0;
while (i
{
*(s+n) = *(s+i);       //uses the null character as the temporary storage.
*(s+i) = *(s + n - i -1);
*(s+n-i-1) = *(s+n);
i++;
}
*(s+n) = ;
 
return s;
}
 
int main()
{
char *str = malloc(10);
 
bzero(str, 10);
sprintf(str, "abcde");
printf("%s ", strrev(str, 5));
return 0;
}
 
         1. Compiler error
2. Runtime error
3. Compile and print some Garbage value
4. None of these
 
 
Q23. What will be the output of the following program?
 
Assume that the array begins at address 65486, and sizeof int is 2.
 
#include
int main()
{
int a[3][4] = {1,2,3,4,
4,3,2,1,
7,8,9,0
};
printf("%u %u", a+1, &a+1);
return 0;
}
 
           
 
1. 65480 65484
2. 65480 65482
3. 65480 65496
4. 65480 65488
 
 
Q24. 

#include
int main()
{
FILE* fp = NULL;
unsigned char c;
fp = fopen("MyFile.txt","r");
while((c = getc(fp)) != EOF)
putchar(c);
fclose(fp);
return 0;
}
 
           
1. Stack overflow
2. Runtime error
3. abcdefghij followed by infinite loop
4. Infinite loop
 
 
 Q25. What will be the output of the following program ?
 
         #include
void func(char*str)
{
int i=0;
*str=i++;
}
int main()
{
int i=0;
char str[5];
for(i=0;i<5;i++)
func(str+i);
for(i=0;i<5;i++)
printf("%c",str[i]);
return 0;  
}
 
         1. Runtime error
2. Empty array string
3. Compiler error
4. 0 1 2 3 4
 
 
 Q26. What will be the output of the following program?
 
#include
int main()
{
int ch;
ch = 65;  
printf("The character that has numeric value of 65 is: ");
putc(ch, stdout);
return 0;
}
 
          1. The character that has numeric value of 65 is: A
 2. The character that has numeric value of 65 is: a
 3. The character that has numeric value of 65 is: B
 4. None of these
 
 
Q27

#include
int main()
{
  int d;
  double *s=0;
  d=(int)(s+1);
  printf("%d",d);
  return 0;
}
 
1. 8
2. 4
3. Runtime error
4. Compiler error

 
Q28

int feof(FILE *stream)
int ferror(FILE *stream);
void clearerr(FILE *stream);
int fileno(FILE *stream);
 
The above functions are used for __________.
 
         1. low level I/O
2. creating temporary file
3. stream status enquiries
4. reading and writing files


Q29. Point out the error if any, in the following program?
 
01   void main(void)
02    {
03      int j,i;
04      int *a[2];
05      int arr[2] = {1,2};
06      int srr[2] = {3,4};
07      a[0] = arr;
08      a[1] = srr;
09      clrscr();
10      for(i=0;i<2;i++){
11        for(j = 0;j<2;j++){
12          printf("%d",a[i]+j);
13        }
14      }
15    getch();
16    }
 
 
1. Prints 4 different addresses
2. Compiles without any error and the output is 1 2 3 4
3. Error in line 07 & 08
4. Error in line 13
 
Q30

01. int main()
02. {
03. FILE* fp = NULL;
04. long size = 0;
05. fp = fopen("MYFile.txt","b");
06. fseek( fp, 4 , SEEK_SET);
07. size = fwrite("TakeCare",1,3,fp);  
08. return 0;
09. }
 
         1. AbcdTakeCare
2. Empty file
3. 4 Take
4. Runtime error at line #4
 


  
   






FreshersLive - No.1 Job site in India. Here you can find latest 2016 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.

closepop
closepop