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

CMC Technical Test 23rd March 2011

Posted on :16-04-2016

Q1. Instruction sequencing is done by the following register:

A. Stack pointer 
B. Instruction register 
C. program counter 
D. Accumulator

 

Q2. Which of the following is a valid flip-flops?

A. JK Flip-flop 
B. S Flip-flop 
C. R Flip-flop 
D. None

 

Q3. Range of signed integers represented by 8 bits:

A. -127 to 127 
B. -128 to 127 
C. -127 to 128 
D. -128 to 128

 

Q4. What is decimal and binary equivalent of an octal number 127?

A. 87 and 1010111 
B. 78 and 1010110 
C. 87 and 1010110 
D. 78 and 1010111

 

Q5. Left shift of bits in binary data is equivalent to:

A. Addition of 2. 
B. Division by 2. 
C. in some other binary number depending on the initial data 
D. Multiplication by 2

 

Q6. What is REENTRANT code segment?

A. Code that can be part of a for or while loop. 
B. Code that is part of a recursive function. 
C. Code that guarantees safe and defined behavior even when parallely executed by two threads. 
D. Code that may result in a race condition.

 

Q7. For "C" language, what is the best reference manual?

A. "C" language from Microsoft 
B. "C" language by Balaguru swamy 
C. "C" language by Kernighan & Ritche 
D. None of the above

 

Q8. Input and outputs of a compiler:

A. Object file, Symbol table 
B. Source code, Object File 
C. Object File, Windows Application 
D. None of these

 

Q9. Main difference of a struct in C and C++

A. In C members are private, C++ members are virtual 
B. In C members are public, C++ members are private 
C. In C members are virtual, C++ members are private 
D. None of the above

 

Q10. What is the output of the following program?

char *p = (char*) malloc (2000000*2 / 10 + 4);
int length = strlen(p);

A. 400004 
B. 200002 
C. NULL 
D. None of the above

 

Q11. Which of the following is true?

A. O(1) < O(n) < O(log n) < O(n log n) < O(n2 ) 
B. O(1) < O(log n) < O(n) < O(n2) < O(n log n) 
C. O(1) < O(n) < O(n log n) < O(log n) < O(n2 ) 
D. O(1) < O(log n) < O(n log n) < O(n2)

 

Q12. The following operations are performed on a stack:
push(10), push(20), pop, push(10), push(20), pop, pop, pop, push(20),pop. The sequence of values popped out are
 

A. 20, 10, 20, 10, 20 
B. 20, 20, 10, 10, 20 
C. 10, 20, 20, 10, 20 
D. 20, 20, 10, 20, 10

 

Q13. The ideal data structure to handle backtracking is?

A. Queue 
B. Tree 
C. Stack 
D. Linked list

 

Q14. A program is written in "C" language, and an executable is made by compiling it on unix/ linux environment. Can we run the executable on windows operating system?

A. Yes, Always 
B. Only on vista operating system 
C. Never 
D. If we change extension to .exe, it will run

 

Q15. Which of the following sorting algorithms does not have worst case running time of O (n2)?

A. Merge Sort 
B. Quick Sort 
C. Bubble Sort
D. Insertion Sort

 

Q16. Which one of the following is the most suitable data structure for applications involving frequent additions and deletions of data elements?

A. Stack 
B. Arrays 
C. Linear lists 
D. Linked list

 

Q17. Given a structure typedef struct { char x; int y, int z} mystruct; sizeof (mystruct) will return

A. 5 -- Always 
B. 6 -- Some times 
C. 8 -- Based on Memory size 
D. None of the above

 

Q18. In a memory system, read access takes 100 ns and write access takes 80 ns. If 60% of the access requests are reads, what is the average access time of the memory?

A. 3 ns 
B. 92 ns 
C. 108 ns 
D. 88 ns

 

Q19. Consider the C language code given below.

int *a;
int b[2];
a = b;
b[0] = -46;
b[1] = -23;
*a = -34;
(*++a)++;

What are the values of b[0], b[1] at the end?

A. -34, -24 
B. -46, -22 
C. -34, -22 
D. -46, -23

 

Q20. Which of the following conditions are necessary for a deadlock?

I. Mutual exclusion
II. Hold & wait
III. No preemption
IV. circular wait

A. I, II, III only 
B. II, III, IV only 
C. I, II, IV only 
D. All of the above

 

Q21. Assuming all headers included, indicate the behavior of the below program:

Int arr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
Int I = 0;
while( I < 10 )
{
printf("%d ", *(arr++));

A. prints numbers from 1 to 10 
B. prints numbers from 1 to 9 
C. prints '1' ten times. 
D. program has compilation errors.

 

Q22. Which of the following shell variable is used to return the process ID of the current shell?

A. $! 
B. $$ 
C. $* 
D. none

 

Q23. Which of the following functions deal with binary output into a file: 

A. fprintf() 
B. fputs(); 
C. fwrite(); 
D. All of the above.

 

Q24. The system call that is key to multitasking in UNIX is:

A. exec 
B. fork 
C. system 
D. none

 

Q25. When a binary tree is traversed in preorder and inorder, the labels of the nodes are printed as below.

Preorder: A B C D E F G H
In order: B C A E G F D H

In what order the nodes appear if the same binary is traversed in post-order?

A. C B G F E H D A 
B. C B E G F H D A 
C. C B F G E D H A 
D. Can't be decided unless tree representation is given

 

Q26.

if c1 then statement1
else if c2 then statement2
else {
statement3;
if c3 then statement4;
statement5;
}

c1, c2, c3 are conditional tests yielding boolean values:

c1 will be true with 40% of probability
c2 will be true with 50% of probability
c3 will be true with 10% of probability

The probability that statement4 will be executed is

A. 60% 
B. 30% 
C. 10% 
D. 3%

 

Q27. What is the output of the following program?

i=0; sum=0; j=0;
while (i<=50)
{
i = i + (j ? 2 : 3);
j = !j;
sum += i;
}
printf ("%d", sum);

A. 410 
B. 630 
C. 490 
D. 530

 

Q28.

if x then y else false

The above statement is equal to following boolean expression:

A. x OR y 
B. x AND y 
C. x XOR y 
D. NOT x

 

Q29. Octal equivalent of hexadecimal number AB is:

A. 523 
B. 253 
C. 171 
D. 1010 1011

 

Q30. Find the odd one out

A. Semiconductor memory 
B. magnetic memory 
C. Charge coupled memory 
D. Virtual memory

 

Q31. Which of the following allows multiple program threads to share the same resource?

A. Mutex 
B. Pipe 
C. File Handle 
D. Deadlock

 

Q32. Postfix representation of A / (B + C) * (D - E) 

A. /A*+BC-DE 
B. ABC+DE-*/ 
C. ABCDE-+*/ 
D. A+BC-DE*/

 

Q33. 2's Complement of 1010001010110111 

A. 0101110101001000 
B. 0101110101001111 
C. 0101110101000111 
D. 0101110101000000

 

Q34. Which of the following is the part of the CPU (Central Processing Unit)?

A. Harddisk 
B. Registers 
C. RAM (Random Access Memory) 
D. DMA (Dynamic Memory Access)

 

Q35. What is the 2 GB (Giga Bytes) equivalent value in decimal?

A. 2141592658 
B. 2097152948 
C. 2000000000 
D. 2147483648

 

Q36. What is the address space range of a microprocessor with 32-bit address bus?

A. 0x 00000000- 0x  FFFFFFFF 
B. 0x 000000- 0x FFFFFF 
C. 0x 0000000- 0x FFFFFFF 
D. 0x 0000- 0x FFFF

 

Q37. Which of the following statement is valid regarding recursive function? 

A. May have a potential of stack overflow error 
B. Cannot pass pointers as arguments to the recursive function. 
C. The function is called in a 'for' or 'while' loop by the calling program. 
D. Best to use in implementing quick sort

 

Q38. !(A || (B && C)) can also be represented as: (Note: ! is negation)

A. !A || !B && !C 
B. !A && !(B && C) 
C. !A || !(B && C) 
D. !A && ( !B || !C&& A)

 

Q39. RACE condition means:

A. two threads of a single program trying to update the same memory at the same point of time resulting in unpredictable data in the memory. 
B. A condition where multiple processes are waiting for the CPU time. 
C. A condition which results in deadlocks. 
D. Two threads halted without further execution, each waiting for the lock obtained by the other thread to be released

 

Q40. Decimal equivalent of Octal number 888 is:

A. 8 + 8*8 + 8*8*8 
B. (8*8*8*8) - 1 
C. 888 
D. None of the above

 

Q41. What is the lowest and highest number that can be represented by an N-digit number in Octal number system?

A. Zero and (N raised to the power of 8) 
B. Zero and (8 raised to the power of N) 
C. Zero and ((8 raised to the power of N) minus 1) 
D. Zero and ((N raised to the power of 8) minus 1)

 

Q42. RDBMS is related to:

A. Theory of Relativity 
B. Relational Data structures with Business Management System 
C. Relational Algebra 
D. All of the above

 

Q43. Choose a set that has an odd element:

A. Windows, Linux, DOS 
B. Oracle, SQL Server, Visual Studio 
C. Mouse, Keyboard, Touch screen 
D. All of the above

 

Q44. There are two tables in a database namely EMPLOYEE and DEPARTMENT. EMPLOYEE table has 6 columns, 60000 rows and DEPARTMENT table has 4 columns, 40000 rows. What is the output of the following SQL query?

Select count (*) from EMPLOYEE, DEPARTMENT

A. 24 
B. 10 
C. 100000 
D. 2400000000

 

Q45. Given 110112 which of the following is false?

A. In unsigned notation it is 27 base 10 
B. In 1's complement notation it is -4 base 10 
C. In 2's complement notation it is -5 base 10 
D. In signed magnitude notation it is +11 base 10

 

Q46. How many 1's are present in the binary representation of (769.625)10?

A. 9 
B. 4 
C. 5 
D. 6

 

Q47. Choose the right declarations for the main() in C:

A. int main(int argc, char *argv[]); 
B. void main(int argc, char *argv[]); 
C. int main(void); 
D. All the above

 

Q48. Choose the valid typedef definitions from the following C code snippets:

A. typedef struct{...}T; 
B. typedef struct S{...}T; 
C. typedef {...}T; 
D. typedef struct S{...};

 

Q49. What are the correct ways of accessing member x in the following structure?

typedef struct{
int x; 
char y;
}T;

T *t = malloc(sizeof(T));
T s; 

A. t->x; 
B. (*t).x; 
C. s.x; 
D. All the above.

 

Q50. Choose valid statement from the following to declare a variable to hold pointer to an array of functions with return type (char *) and takes an argument int

A. char * (**p) (int x); 
B. char * (*p[]) (int x); 
C. char * (p[]) (int x); 
D. char * (*(*p)) int x;

 

Q51. What is the value of the variable z in the following C code snippet at the end of the program?

void test(void){ 
int x=3; 
int y=5; 
int z; 

x += x++; 
z = 2 * ++x + y; 

A. 19 
B. 21 
C. 15 
D. 17

 

Q52. What is the result of the variable z in the following C code snippet at the end of the program?

#define modify (A, B) ((A) < (B) ? (++A) : (B--))
int a=4,b=2;
int x = modify(a,b);
a=3;b=6;
int y = modify(a,b);
int z = y - x;

A. 1 
B. 2 
C. 3 
D. None of the above

 

Q53. Which of the following doesn't represent a storage class?

A. auto 
B. public 
C. register 
D. static

 

Q54. Which of the following are not valid C language statements?

A. for(;;){} 
B. while(true){} 
C. while(1){} 
D. None of the above

 

Q55. Which of the following are not valid function for memory allocation in standard C library?

A. malloc() 
B. realloc() 
C. memalloc() 
D. calloc()

 

Q56. Which of the following are not valid C language keywords?

A. extern 
B. function 
C. const 
D. register

 

Q57. What is the value of the variable e in the following C code snippet?

int a=3, b=4, c=2, d=3;
int e = (a << 1) * b / c - (d >> 1);

A. 8 
B. 10 
C. 13 
D. None of the above

 

Q58. Consider the C language code given below. 

int *a;
int b[2];
a = b;
b[0] = -46;
b[1] = -23;
*a = -34;
(*++a)++;

What are the values of b[0], b[1] at the end?

A. -34, -24 
B. -46, -22 
C. -34, -22 
D. -46, -23

 

Q59. What is the output of the following program?

i=0; sum=0; j=0;
while (i<=50)

i = i + (j ? 2 : 3);
j = !j;
sum += i;
}
printf ("%d", sum);

A. 410 
B. 630 
C. 490 
D. 530

 

Q60. Assuming all required headers are included, see the below code segment and select the correct option(s) A, B, C and/or D given below and write your comments, if any, on the code segment:

Line 1 : int *iptr ;
Line 2 : printf("Type a number:");
Line 3 : scanf("%d", iptr);
Line 4 : printf("Integer value is %d ", iptr);

A. Missing '&' before 'iptr' in Line 3. 
B. Program will cause segmentation fault. 
C. Program will not compile as there are errors in this code segment. 
D. Program prints the given number in Line 4.

 

Q61. What is the output of the following program? 

int a = 1; b = 2; c = 3;
if( ( a == 1 ) && ( ++b == 2 ) && ( c-- == 1 ) )
{
printf( "%d, %d, %d ", a, b, c );

A. 1, 2, 3 
B. 1, 3, 2 
C. 2, 3, 4 
D. 1, 3, 3

 

Q62. Assuming all headers required are included. see the program below and answer

void my_int_alloc( int *i_ptr, int sz ); /* function to allocate memory */
int main()

int *int_ptr ;
my_int_alloc(int_ptr,20);
int_ptr[19] = 100;
printf("%d",int_ptr[19]);
free(int_ptr);
return 0;
}

void my_int_alloc( int *i_ptr, int sz )
{
i_ptr = (int *)malloc(sz*sizeof(int)); /* assume malloc never fails */
return;
}

Select the correct option(s) from A, B, C and/or D below: 

A. The program has memory leaks and it tries to free unallocated memory. 
B. The printf prints the value '100'. 
C. There should not be a 'return' statement in a function returning void 
D. The program will not compile.

 

Q63. Assuming all headers are included, see the below program segment and select the option A, B, C and/or D

char src[11] = "CMC";
char dest[11] = "LIMITED";
strcpy(src+3, dest);
printf("%s ", src);

A. Program has compilation errors in the line having strcpy call. 
B. Program results in segmentation fault. 
C. Program prints "LIMITED" 
D. Program prints "CMCLIMITED"

 

Q64. The program 

int main(int argc , char *argv[])
{
printf("%s ", ++(*(argv+argc-2))); 
return 0;
}
if run with the command
$> prog_name one two three four

will have the below behavior: (select the right option) 

A. program has compilation errors 
B. Program prints "three" 
C. program prints "hree" 
D. program prints "three four"

 

Q65. Which of the following statements are valid regarding "static" variables in C? 

A. Have global scope and lifetime till the end of the program. 
B. Have block scope and lifetime till the end of the block. 
C. Have block scope and lifetime till the end of the program. 
D. Have global scope and lifetime till the end of the block

 

Q66. What is the output of the code segment below?

char c;
int i = 0 ;
for( c = 'A' + i ; c < 'Z' ; c += 2,i++ ) 
{
printf("%c", c);
}

A. ADHMS (skips 2,3,4,5 characters in between A and Z) 
B. ACEGIKMOQSUWY (skips one char in between A and Z) 
C. ABCDEFGHI...Y (prints all characters from A to Y) 
D. Program does not compile.

 

Q67. Select the correct statements in relation to the "realloc" function

A. The realloc tries to allocate new memory which starts at the old memory and if it cannot find sequenctial memory extending the old memory, realloc will fail.. 
B. After the call to realloc, we need to copy the data from the old pointer 
C. Based on where the new memory is allocated, the realloc function takes care
of copying the data into the new location, but the caller needs to free the 
D. Both data copy and freeing of old memory whenever required, is taken care

 

Q68. In the declaration

char c_arr[100] = "CMCLIMITED" ; ,

c_arr is:

A. a constant pointer to character. 
B. non-const pointer to a character constant. 
C. non-const pointer to character. 
D. a constant pointer to constant character.

 

Q69. Looking at the code lines below, select the correct statement(s) below:

Line 1 char *c_ptr;
Line 2 char a_arr[100];
Line 3 c_ptr = (char *)malloc(10*sizeof(int));
Line 4 c_ptr = c_arr;
Line 5 free(c_ptr);

A. Line 3 has compilation error : it uses sizeof(int) instead of sizeof(char) 
B. Line 4 has an error as we cannot assign an array pointer to a normal pointer. 
C. Line 5 has a compilation error. 
D. Line 5 has undefined behavior.

 

Q70. Which of the following are valid file operation functions in C?

A. fseek() 
B. ftell() 
C. rewind() 
D. All of the above.

 


  
   






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