Kshema
1. What are the key differences between C & C++.
2. How is the struct functionality different in C and in C++.
3. What is the difference between the following
a. i=i+1; b. ++i;
ANS: ++i is a single instruction while in i=i+1, first i+1 is computed andthen assigned.
4. What is the difference between the two files.
file1.c
# include...........
int i;
void main(){
..........}
file2.c
# include
static int i;
void main(){.....}
ANS: While in this case for both the programs... the scope and lifetime ofvariable 'i' is throughout the program..... the value of 'i' is not. For eg. if 'i=2' in the file1.c, any other program accessing thisvariable from outside will still see the value of i as 2. Whereas in File2.c if the variable 'i' is accessed from any otherprogram its value will always be seen as 0
Reason: For static variables their values are active only within theCOMPILE AREA of where it is declared or in the program where it is declared.
4. Explain the OSI layer and TCP/IP layer and their differences.
5. Explain the difference in memory management in Windows and Linux if thereare any.
6. What are the differences between C++ in windows and C++ in Linux.
7. Explain some api's used in Networking (in LINUX and WINDOWS)
8. What is exception handling and how is it different from errorhandling...... Why is exception handling used instead of error handling insome cases and vice versa.
9. What is Hashing in Datastructures and why is it used. What the criterisfor Hashing and explain some of them.
10. What are the criterias to be considered for Searching algorithms.
ANS: The size of the list and whether it is sorted.(these two are apparentlymost important.... and that is the answer they expect)
11. What is the key aspect of Object Oriented Programming
ANS: DATA ABSTRACTION (I personally felt "data encapsulation"...... butapparently the former mentioned was and is correct)
12. Explain sliding window protocol.
13. What is the SELECT() API in networking.
******Compiled by Subramanian S.**************************************************
*******************************************************1.difference between C / C++
2.Explanation of OOP principles -Data Abstraction. -Data Encapsulation -Inheritence -Polymorphism -Dynamic Binding. -Reduction of Errors.
3.What is a Friend Function ? Explain with an Example.
4.Is the following code an Example of Dynamic Binding Explain?
class Base{ Public: virtual Bool Dosomething() ------ ------ ------};
class Derived1: public Base{ Public: Bool Dosomething(); ----------- ----------- -----------};
class Derived2: public Base{ Public: Bool Dosomething(); ----------- ----------- -----------};
void main(){ Derived1 derived1; Derived2 derived2;
::process(derived1);::process(derived2);}
::Process(Base& Object){ Object.Dosomething();}
Answer: In the processfunction above the downcasting is done while passingparameters and in the function body upcasting is done soobject.dosomething() will be dynamic binding ( i am unable to explain theanswer in clear terms....but the line of thinking is something likethat....)
5.What will happen if in the above code in the base class the keywordvirtual is removed?
Answer: IF virtual is removed from the function declaration. when theprocess function is called it calls the Dosomething function of theBaseclass itself rather than the derived classes.
6.What is a circular queue? Why is it better than a normal queue? and Givesome practical Examples of usage of circular queue
Usage: Scheduling Processes&Resources (esp in Operating Systems.) used as a circular buffer especially in Embedded Systems(because memoryis a constraint).
7.What is Hashing? Explain the procedure to obtain a hashing table.
8.Give a brief presentation of your 8th Semester Project.
2. How is the struct functionality different in C and in C++.
3. What is the difference between the following
a. i=i+1; b. ++i;
ANS: ++i is a single instruction while in i=i+1, first i+1 is computed andthen assigned.
4. What is the difference between the two files.
file1.c
# include...........
int i;
void main(){
..........}
file2.c
# include
static int i;
void main(){.....}
ANS: While in this case for both the programs... the scope and lifetime ofvariable 'i' is throughout the program..... the value of 'i' is not. For eg. if 'i=2' in the file1.c, any other program accessing thisvariable from outside will still see the value of i as 2. Whereas in File2.c if the variable 'i' is accessed from any otherprogram its value will always be seen as 0
Reason: For static variables their values are active only within theCOMPILE AREA of where it is declared or in the program where it is declared.
4. Explain the OSI layer and TCP/IP layer and their differences.
5. Explain the difference in memory management in Windows and Linux if thereare any.
6. What are the differences between C++ in windows and C++ in Linux.
7. Explain some api's used in Networking (in LINUX and WINDOWS)
8. What is exception handling and how is it different from errorhandling...... Why is exception handling used instead of error handling insome cases and vice versa.
9. What is Hashing in Datastructures and why is it used. What the criterisfor Hashing and explain some of them.
10. What are the criterias to be considered for Searching algorithms.
ANS: The size of the list and whether it is sorted.(these two are apparentlymost important.... and that is the answer they expect)
11. What is the key aspect of Object Oriented Programming
ANS: DATA ABSTRACTION (I personally felt "data encapsulation"...... butapparently the former mentioned was and is correct)
12. Explain sliding window protocol.
13. What is the SELECT() API in networking.
******Compiled by Subramanian S.**************************************************
*******************************************************1.difference between C / C++
2.Explanation of OOP principles -Data Abstraction. -Data Encapsulation -Inheritence -Polymorphism -Dynamic Binding. -Reduction of Errors.
3.What is a Friend Function ? Explain with an Example.
4.Is the following code an Example of Dynamic Binding Explain?
class Base{ Public: virtual Bool Dosomething() ------ ------ ------};
class Derived1: public Base{ Public: Bool Dosomething(); ----------- ----------- -----------};
class Derived2: public Base{ Public: Bool Dosomething(); ----------- ----------- -----------};
void main(){ Derived1 derived1; Derived2 derived2;
::process(derived1);::process(derived2);}
::Process(Base& Object){ Object.Dosomething();}
Answer: In the processfunction above the downcasting is done while passingparameters and in the function body upcasting is done soobject.dosomething() will be dynamic binding ( i am unable to explain theanswer in clear terms....but the line of thinking is something likethat....)
5.What will happen if in the above code in the base class the keywordvirtual is removed?
Answer: IF virtual is removed from the function declaration. when theprocess function is called it calls the Dosomething function of theBaseclass itself rather than the derived classes.
6.What is a circular queue? Why is it better than a normal queue? and Givesome practical Examples of usage of circular queue
Usage: Scheduling Processes&Resources (esp in Operating Systems.) used as a circular buffer especially in Embedded Systems(because memoryis a constraint).
7.What is Hashing? Explain the procedure to obtain a hashing table.
8.Give a brief presentation of your 8th Semester Project.
0 Comments:
Post a Comment
<< Home