C Interview Questions
Questions Answers Views Company eMail

write a prgram of swapping with 2 valiables

6 2611

Why c++ is called c++ and not c+?

EBS,

9 21935

how to set Nth bit of a variable?

1 6026




what is the output on the screen? int n; n=printf("my name is %d",printf("kiran %d",printf("kumar"))); printf("\n %d \n",n);

TCS,

4 3211

what is the output of below int n=10; (n++)++; printf("%d",n);

3 5737

why we need function pointers?

3 3595

how to find your architecture is LittleEndian or BigEndian?

1 2915

Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

1091




Write a program that takes a 5 digit number and calculates 2 power that number and prints it

HCL, TCS, Infosys, Infotech, Accenture, Vertex, Vimukti Technologies, ABS, SoftSolve, Software India,

5 10812

write a program wch produces its own source code aas its output?

IonIdea,

1 5271

write a program which will count occurance of a day between two dates.

IonIdea,

1 5050

how to set Nth bit of variable by using MACRO

HCL,

3 22022

#include void main() { int a,b,c; a=b=c=1; c=++a || ++b && ++c; printf("%d\t%d\t%d",a,b,c); }

3 4322

write C code to reverse a string such that if i/p is "abc defg hij klmno pqrs tuv wxyz" and the o/p should be "cba gfed jih onmlk srqp vut zyxw"

2 2714

diff .between strcture and union

2 2326


Post New C Questions






Un-Answered Questions { C }

process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

1122


a program that can input number of records and can view it again the record

808


Agonistic behavior, or aggression, is exhibited by most of the more than three million species of animals on this planet. Animal behaviorists still disagree on a comprehensive definition of the term, hut aggressive behavior can be loosely described as any action that harms an adversary or compels it to retreat. Aggression may serve many purposes, such as Food gathering, establishing territory, and enforcing social hierarchy. In a general Darwinian sense, however, the purpose of aggressive behavior is to increase the individual animal’s—and thus, the species’—chance of survival. Aggressive behavior may he directed at animals of other species, or it may be conspecific—that is, directed at members of an animal’s own species. One of the most common examples of conspecific aggression occurs in the establishment and maintenance of social hierarchies. In a hierarchy, social dominance is usually established according to physical superiority; the classic example is that of a pecking order among domestic fowl. The dominance hierarchy may be viewed as a means of social control that reduces the incidence of attack within a group. Once established, the hierarchy is rarely threatened by disputes because the inferior animal immediately submits when confronted by a superior. Two basic types of aggressive behavior are common to most species: attack and defensive threat. Each type involves a particular pattern of physiological and behavioral responses, which tends not to vary regardless of the stimulus that provokes it. For example, the pattern of attack behavior in cats involves a series of movements, such as stalking, biting, seizing with the forepaws and scratching with tile hind legs, that changes very little regardless of the stimulus—that is, regardless of who or what the cat is attacking. The cat’s defensive threat response offers another set of closely linked physiological and behavioral patterns. The cardiovascular system begins to pump blood at a faster rate, in preparation for sudden physical activity. The eves narrow and the ears flatten against the side of the cat’s head for protection, and other vulnerable areas of the body such as the stomach and throat are similarly contracted. Growling or hissing noises and erect fur also signal defensive threat. As with the attack response, this pattern of responses is generated with little variation regardless of the nature of the stimulus. Are these aggressive patterns of attack and defensive threat innate, genetically programmed, or are they learned? The answer seems to be a combination of both. A mouse is helpless at birth, but by its l2th day of life can assume a defensive threat position by backing up on its hind legs. By the time it is one month old, the mouse begins to exhibit the attack response. Nonetheless, copious evidence suggests that animals learn and practice aggressive behavior; one need look no further than the sight of a kitten playing with a ball of string. All the elements of attack—stalking, pouncing, biting, and shaking—are part of the game that prepares the kitten for more serious situations later in life. 7) The passage asserts that animal social hierarchies are generally stable because: a) the behavior responses of the group are known by all its members. b) the defensive threat posture quickly stops most conflicts. c) inferior animals usually defer to their physical superior. d) the need for mutual protection from other species inhibits conspecific aggression. 8) According to the author, what is the most significant physiological change undergone by a cat assuming the defensive threat position? a) An increase in cardiovascular activity b) A sudden narrowing of the eyes c) A contraction of the abdominal muscles d) The author does not say which change is most significant 9) Based on the information in the passage about agonistic behavior, it is reasonable to conclude that: I. the purpose of agonistic behavior is to help ensure the survival of the species. II. agonistic behavior is both innate and learned. III. conspecific aggression is more frequent than i aggression. a) I only b) II only c) I and II only d) I,II and III only 10) Which of the following would be most in accord with the information presented in the passage? a) The aggressive behavior of sharks is closely inked to their need to remain in constant motion. b) fine inability of newborn mice to exhibit the attack response proves that aggressive behavior must be learned. c) Most animal species that do riot exhibit aggressive behavior are prevented from doing so by environmental factors. d) Members of a certain species of hawk use the same method to prey on both squirrels and gophers. 11) The author suggests that the question of whether agonistic behavior is genetically programmed or learned: a) still generates considerable controversy among animal behaviorists. b) was first investigated through experiments on mice. c) is outdated since most scientists now believe the genetic element to be most important. d) has been the subject of extensive clinical study. 12) Which of the following topics related to agonistic behavior is NOT explicitly addressed in the passage? a) The physiological changes that accompany attack behavior in cats b) The evolutionary purpose of aggression c) Conspecific aggression that occurs in dominance hierarchies d) The relationship between play and aggression 13) The author of this passage is primarily concerned with: a) analyzing the differences between attack behavior and defensive threat behavior. b) introducing a subject currently debated among animal behaviorists. c) providing a general overview of aggressive behavior in animals. d) illustrating various manifestations of agonistic behavior among mammals.

1149


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

288


Hi can anyone tell what is a start up code?

940






please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

855


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

802


Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.

280


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

916


can we have joblib in a proc ?

991


what are # pragma staments?

896


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

2030


pierrot's divisor program using c or c++ code

1078


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

1007


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

966