Sei sulla pagina 1di 9

whats the difference between copy constructor and assignment operator?

So, the answer should be, that the copy costructor is called at initializing the object, while the assignment operator used to assign one object by another. http://www.discussionsworld.com/forum_posts.asp? TID=37449&SID=zb885ac32318b9d9d9z8cceb81145195

Qualcomm Placement Paper Jan 2008 There were 25 technical questions which were objective.The given time was 45 minutes which was more than enough.The level of the question was a kind of easy. There was 2-3 question from network,two questions from Theory of computaion,1 question from c++, there was not any question from DBMS, and the rest of the questions were from c and data structure. The network question were conceptual. In theory of computation they asked if the given languages were regular or not. In one question they asked whether the grammar is context free or context sensitive. In os there was a question from deadlock. In c except one or two all the question were easy.one of the question was very lengthy. some of the technical questions were like below

1.how much space is allocated by the expression " int *a[10]" if size of int is 4 and size of int pointer is 2. optins were 2,4,20,40 2.given a preorder traversal of a binary search tree we had to find the inorder traversal. 3.which is not valid if p and q are integer pointers? char *p="this is a string"; char *q; q=p+3; int r=4; a.p+q b.p-q c.P+r/3 d.p- r/3

4.there was a typical question on linked list in which all the nodes have to deleted but the reference was lost .we had to correct that.

5.In c++ there was a question to find the difference between assignment and copy constructor. http://www.foddalo.com/viewtopic.php?t=1030&f=65

Qualcomm Interview questions...


by cracktheinterview on Wed May 14, 2008 3:54 pm Qualcomm Interview questions... Implement a function which return 2 largest numbers in an array. What is a process? What info need to be recorded by PCB? Where is static var stored (in C)? What is thread? Compare thread and process. What is the advantage of using thread? What is system call? What is the diff between hash table and linked list? What is in IP header? What is happened when a user press a key on the keyboard? http://www.cinterviews.com/2010/07/qualcomm-interview-questions-for.html

Qualcomm Interview Questions for Engineers


Initial round at Qualcomm Interview 1. How can you defined OOP? 2. How can you use OOP in your projects/products/applications? 3. What is copy constructor? 4. How many types of copy constructor are there? 5. What shallow copy constructor does/behaves? 6. Does C++ support copy constructor? 7. Does Java support copy constructor? 8. (If the answer to the previous question was correct) Why doesnt Java support copy constructor? 9. What is software life cycle? Some Questions on 1)Data structures and bitwise questions

2)vmalloc, kalloc, volatile, constant, and memory management 3) Operating system questions in kernel. Data structures(linked list), algorithms and OS questions How would you implement dynamic memory allocation without using malloc? There is a body of water that starts with 1 square unit, and doubles in size every day (2 units after 2 days, 4 units after 4 days). It takes 100 days to fill up. How many days would it take to fill if you started with 2 square units? Was asked to write a code to count the number of set bits in a 32 bit interger? 1) Lets say that I have a continuous bit pattern of 1's and there is a1 ms glitch of 0's. How do I capture the glitch and display a stationary image of it? (assuming that 1 ms is too fast for out eyes to appreciably notice the change) 2) What are the four properties of a PN sequence? 3) Why do most hardware testers use stacks in their programs to store data? http://www.careercup.com/page?pid=qualcomm-interview-questions check this site http://marooooned.blogspot.com/2007/10/i-remember-frantically-searching-for.html How good are you at C and C++? What do you prefer? What is object oriented programming? What is encapsulation & polymorphism? Examples. What kinds of variables are found in C? Explain static & extern with the help of an example. What is difference between static and global?

What is static and dynamic process? Explain about processes. What are threads? How many types of processes? How process transition takes place? Explain about memory allocation. Explain Physical and Logical addresses. My computer has a word of 2^16 but at once only 2^10 can be read. How will it be written in memory?

What are the steps involved in compiling a program? How are objects files (.o) used during compiling? Explain assembling, linking etc. from compilers point of view. http://geeksforgeeks.org/forum/topic/qualcomm-interview-question-for-softwareengineerdeveloper-about-cpuzzles-1 In c++ there was a question to find the difference between assignment and copyconstructor Ans: Copy constructor copies an existing object to a non existing object. Assignment operator assigns one object (already constructed) to another object(already constructed) Sample code:
#include <iostream> using namespace std; class A { public: A(): _value(0) { } explicit A(int value) : _value(value) {} explicit A(const A& oth); A& operator=(const A& oth); int getVal() const { return _value; } void print() { cout << "value = " << _value << '\n'; } private: int _value; }; A::A(const A& oth) { cout << "\nInside A<T>::A\n"; _value = oth.getVal(); } A& A::operator=(const A& oth) { cout << "\nInside A<T>::operator=\n"; _value = oth.getVal(); return *this; }

int { A A A

main() a1(10); a2(a1); a3(11);

a3 = a2; a1.print(); a2.print(); a3.print(); }

Output: Inside A<T>::A Inside A<T>::operator= value = 10 value = 10 value = 10 http://www.allinterview.com/company/Qualcomm/interview-questions.html Given a light which may blink at a random time. There are two players who has to press a button when light blinks. The person who gets 20 pts first is declared as winner. Design FSM for this gaming event Write a C program to perform some of the operation which can be performed using Single linked list You have an int array with n elements and a structure with three int members. ie struct No { unsigned int no1; unsigned int no2; unsigned int no3; }; Point1.Lets say 1 byte in the array element is represented like this - 1st 3 bits from LSB is one number, next 2 bits are 2nd no and last 3 bits are 3rd no. Now write a function, struct No* ExtractNos(unsigned int *, int count) which extracts each byte from array and converts LSByte in the order mentioned in point1.and save it the structure no1, no2, no3. in the function struct No* ExtractNos(unsigned int *, int count), first parameter points to the base address of array and second parameter says the no of elements in the array. For example: if your array LSB is Hex F7 then result no1 = 7, no2 = 2, no3 = 7. In the same way convert all the elements from the array and save the result in array of structure. What is an arm processor? What is the output of following program ? int main() { int x = 5; printf("%d %d %d\n", x, x << 2, x >> 2); } Toggle nth bit in a given integer - num

Binary tree traversing What is priority inversion ? and What is the solution ? What is the use of Thumb instructions in ARM processor ? Whats wrong with the following function char *string() { char *text[20]; strcpy(text,"Hello world"); return text; } 1.write a program to merge the arrays 2.write efficient code for extracting unique elements from a sorted list of array? 1.find the second maximum in an array? 2.how do you create hash table in c? 3.what is hash collision how to debug the report? Write an implementation of float stringToFloat(char *str). The code should be simple, and not require more than the basic operators (if, for, math operators, etc.). Assumptions Dont worry about overflow or underflow Stop at the 1st invalid character and return the number you have converted till then, if the 1st character is invalid return 0 Dont worry about exponential (e.g. 1e10), instead you should treat e as an invalid character Write it like real code, e.g. do error checking Go though the string only once Examples 1.23 should return 1.23 1a should return 1 ashould return 0 There are 2 Flip_Flop with logic between them. Given Clock to Q delay, logic prop. delay, set up and hold times specify maximum clock frequency of system. What happens if second output fed back to first input. Any changes? What happens with timing if second output is fed back to logic between the flops? Good Luck! http://voiptechhyd.blogspot.com/2008/10/qualcomm-interview-questions.html Telephonic round At the start of the interview, interviewer was mainly concentrating upon IPCs and Sockets, followed by VOIP protocols, and questions and C, C++. 1. Questions about pipes and message queues - difference between them, why one is better than the other, related questions. 2. Processes in message queues - (what happens when) multiple processes put in one message queue, (what happens when) reader is one, senders are many, related questions. 3. Questions related to sockets - connect() function call, questions related to select() system call - what does it return (return value number of fds), how do you manipulate the fds, questions related to readfds and writefds.

4. Questions related to SSRC, CSRC in RTP/RTCP. 5. H.245 (H.323) packet size. 6. Questions about what are CCSRL, NSRP. 7. Questions related to pure virtual function (what is). 8. What is a template. 9. What is volatile, where is it used and related questions. After clearing the Telephonic round, I was called for interview at Qualcomm. Round One 1. Write code to Fill 20GB of memory with "10111" bit pattern. 2. Write code to traverse a m*n array in a spiral pattern. 3. i=0, j=1 if(i,j) printf("......"); else printf("......"); What is the output of the code snippet? 4. Questions related to constants in C and C++, what is the difference between constants in both, etc. 5. What is name mangling in C++? Where it is used, related questions. 6. Showed a code snippet - asked questions related to that. Round Two 1. Questions related to function pointers, array of function pointers. 2. Write code for Swap using pointers (don't use extra variable). 3. Questions related to string copy, strncpy (code snippets - writing and also showed code and asked questions on that). 4. Questions related to struct and union, differences, code snippets. Round Three 1. Write code for deletion of nodes in Binary Search trees. 2. Write code for deletion of nodes in Double Linked List. 3. RTOS concepts related questions. 4. What is priority inversion. 5. What is scheduling policy - related questions. 6. Questions related to processes, threads, tasks. Round Four Manager round - Mostly questions related to Resume and Projects done. Round Five HR round - About Qualcomm, policies and how they are improving facilities, etc. http://coding.derkeiler.com/Archive/General/comp.arch.embedded/200604/msg00228.html

1> Lets say that I have a continuous bit pattern of 1's and there is a 1 ms glitch of 0's. How do I capture the glitch and display a stationary image of it? (assuming that 1 ms is too fast for out eyes to appreciably notice the change) 2> What are the four properties of a PN sequence? 3> Why do most hardware testers use stacks in their programs to store data? http://www.brazencareerist.com/2010/07/27/qualcomm-interview-questions-forengineers Initial round at Qualcomm Interview 1. How can you defined OOP? 2. How can you use OOP in your projects/products/applications? 3. What is copy constructor? 4. How many types of copy constructor are there? 5. What shallow copy constructor does/behaves? 6. Does C++ support copy constructor? 7. Does Java support copy constructor? 8. (If the answer to the previous question was correct) Why doesnt Java support copy constructor? 9. What is software life cycle? Next Interview What was your experience in ASIC design? Questions about analog circuits? Design a lift control system and make it foolproof.? why or why not use direct conversion systems? Some Questions on => Data structures and bitwise questions => vmalloc, kalloc, volatile, constant, and memory management => Operating system questions in kernel. Data structures(linked list), algorithms and OS questions How would you implement dynamic memory allocation without using malloc? There is a body of water that starts with 1 square unit, and doubles in size every day (2 units after 2 days, 4 units after 4 days). It takes 100 days to fill up. How many days would it take to fill if you started with 2 square units? Was asked to write a code to count the number of set bits in a 32 bit interger?

http://interviewquestionsbank.com/tags/Qualcomm-interview-questions/

http://www.ihas1337code.com/category/qualcomm-interview http://www.gplassets.com/myinterview.php?id=789 http://www.cracktheinterview.net/qualcomm/

Potrebbero piacerti anche