Friday, July 30, 2010

Some Technical Interview questions on C and C++.

Hello friends,
Here are some questions that are regularly asked in interviews.Be prepared with crisp and perfect answer to all of these.

1>What are the different storage class specifiers in C?explain them?.

2>Explain the memory segments in c?(code segment,data,stack and heap).

3>Diff between declaration and definition?give examples w.r.t to variables and functions?.

4>What do u mean by little-endian and big-endian?write a code to determine wheather the machine is little-endian or big-endian?.

5>What are the difference between c and c++?explain the pillars of oops?.

6>Give the real-world examples for each pillar of oops?.

7>What is the difference between structures and unions?give real world example where unions are used?.

8> Write a program to reverse a string with an efficiency of n/2?.

9>Write a program to check the palindrome of a string?.

10>Write a single line condition that checks wheather the string is power of 2 or not?.

11>Write the code to set the particular bit in a integer?.

12>What do u mean by pointer?explain the difference between constant pointer and pointer to a constant?.

13>Write a program to reverse the singly linked list?.

14>How would u check, list is circular or not?.

15>I want to delete the middle node in a list of some thousands of nodes(given the address of that deleting node).How will u do this efficiently?.

16>How does the free function works in c?.
17>Give the real-world example where the static variables are used?

18>What do u mean by volatile variable?why it is used?is it possible to decalre a variable which is constant and volatile?.

19>Write a program to swap 2 variables without using temporary variable?

20>Is it possible to execute a user defined function after calling exit in a program?

21>What do u mean by variable number of arguments?.Write a function to use variable number of arguments?

22>What do u mean by virtual functions?How these are achieved?.

23>Explain the different types of inheritance with an example?

24>What is the issue with multiple inheritance?

25>Write a program to swap 2 nibbles in a byte?

26>Write a C program to find the number of 1's in an integer?

27>Write a C Program to sum the digits in an integer?

28>What do u mean by preprocessor statements?I want to compile only some part of code
depending upon some condition.How do i achieve this?

29>Define constructor and destructor?Explain the execution of both w.r.t base class and derived class?

30>What is copy constructor?When is it called?


31>What is the difference between dynamic linking and static linking of  libraries?














Monday, March 29, 2010

Learning...

What is learning? Is it a change in behaviour or understanding? Is it a process? Here we survey some studies about learning.


I am talking about LEARNING - the insatiable curiosity that drives the child to learn so many things starting from birth..I am talking about the student who says, "I am discovering, drawing in from the outside, and making that which is drawn in a real part of me".I am talking about any learning in which the experience of the learner progresses along this line: "No, no, that's not what I want"; "Wait! This is closer to what I am interested in, what I need"; "Ah, here it is! Now I'm grasping and comprehending what I need and what I want to know!" Carl Rogers .Learning about learning is curious rite....?????

some studies discovered that learning can be viewed as a process and also a product..how is it??..
let's see their words..

Learning as a product

Pick up a standard psychology textbook - especially from the 1960s and 1970s and you will probably find learning defined as a change in behavior. In other words, learning is approached as an outcome - the end product of some process. It can be recognized or seen. This approach has the virtue of highlighting a crucial aspect of learning - change. It's apparent clarity may also make some sense when conducting experiments. However, it is rather a blunt instrument. For example:

  • Does a person need to perform in order for learning to have happened?
  • Are there other factors that may cause behaviour to change?
  • Can the change involved include the potential for change? (Merriam and Caffarella 1991: 124)
Questions such as these have led to qualification. Some have looked to identifying relatively permanent changes in behaviour (or potential for change) as a result of experiences (see behaviourism below). However, not all changes in behaviour resulting from experience involve learning. It would seem fair to expect that if we are to say that learning has taken place, experience should have been used in some way. Conditioning may result in a change in behaviour, but the change may not involved drawing upon experience to generate new knowledge. Not surprisingly, many theorists have, thus, been less concerned with overt behaviour but with changes in the ways in which people 'understand, or experience, or conceptualize the world around them' (Ramsden 1992: 4) . The focus for them, is gaining knowledge or ability through the use of experience.


Learning as a process - task-conscious or acquisition learning and learning-conscious or formalized learning

Säljö identified that we can see learning appearing as a process - there is a concern with what happens when the learning takes place. In this way, learning could be thought of as 'a process by which behaviour changes as a result of experience' (Maples and Webster 1980 quoted in Merriam and Caffarella 1991: 124). One of the significant questions that arises is the extent to which people are conscious of what is going on. Are they aware that they are engaged in learning - and what significance does it have if they are? Such questions have appeared in various guises over the years - and have surfaced, for example, in debates around the rather confusing notion of informal learning.

One particularly helpful way of approaching the area has been formulated by Alan Rogers (2003). Drawing especially on the work of those who study the learning of language (for example, Krashen 1982), Rogers sets out two contrasting approaches: task-conscious or acquisition learning and learning-conscious or formalized learning.

Task-conscious or acquisition learning. Acquisition learning is seen as going on all the time. It is 'concrete, immediate and confined to a specific activity; it is not concerned with general principles' (Rogers 2003: 18). Examples include much of the learning involved in parenting or with running a home. Some have referred to this kind of learning as unconscious or implicit. Rogers (2003: 21), however, suggests that it might be better to speak of it as having a consciousness of the task. In other words, whilst the learner may not be conscious of learning, they are usually aware of the specific task in hand.

Learning-conscious or formalized learning. Formalized learning arises from the process of facilitating learning. It is 'educative learning' rather than the accumulation of experience. To this extent there is a consciousness of learning - people are aware that the task they are engaged in entails learning. 'Learning itself is the task. What formalized learning does is to make learning more conscious in order to enhance it' (Rogers 2003: 27). It involves guided episodes of learning.


Learning involves many aspects...Learning about learning is also a life-long process.....