Earn upto Rs. 9,000 pm checking Emails. Join now!

Enter your email address:

Delivered by FeedBurner

Friday, July 18, 2008

CDAC recruitment procedure & Questions

Sections A ( C programming) Total Question 35
Sections B ( Digital, Mup,Electrical,Networking) Total Question 35
Sections C( Apittute) Total Question 30
Section A
1. What is the output of
main()
{
int a=3,b=5,c=50;
a=b==c;
printf("a-%d\n",a);
}
Ans: a=0
2. What is the output of
main()
{
int x=4;
x<<1;
printf("%d",x)
}
Ans: 8
3.Arrays are preffered over link list while?
Ans: Accessing elements.
4. The getch() library function returns:
Ans: ans Displays a character on the screen when any key is pressed.
Section B
1. Consider the boolean expression x,yz,+x,y,z+x(y+z) and give its POS.
Ans: NA
2. The logic Expression Y=Em(0,3,6,7,10,12,15) is equivalent to.
Ans: NA
3. The number of 43 in 2,s complement is
Ans: 00101011
4. The process to process delivery of the entire message is the responsibilty of___________
Ans: Transport Layer
5. The IP is ____________ protocol
Ans: Reliable and connection oriented
6. The ____________ sub layer is responsible for the operation of CSMA/CD access method in framing
Ans: MAC
7. Gigabit ethernet has a data rate of _________ Mbps
Ans: NA
Section C
Analogies:
1. Mansard: Roof::
Ans: Dormer: window
2. Curatot:painting::
Ans: Archvist:manuscript
Antonyms:
1. Motile
Ans: NA
2. Forge



Programmin Concepts

61. The ability to reuse objects already defined, perhaps for a different purpose, with modification appropriate to the new purpose, is referred to as
Information hiding
Inheritance
Redefinition
Overloading

62. The term given to the process of hiding all the details of an object that do not contribute to its essential characteristics is called _____________
data-hiding
packaging
encapsulation
abstraction

63.Object Oriented Technology`s ______ feature means that a small change in user requirements should not require large changes to be made to the system
Abstraction
Modularity
Encapsulation
Modelling

64. An object has _____
State
Behaviour
Identity
All of these options

65. Which of the following is true:
Class is an object of an object
Class is meta class
Class cannot have zero instances
None of these options

66. If a derived class object is explicitly destroyed by applying the delete operator to a base-class pointer to the object, the _____ function is automatically called on the object Derived-class destructor
Base-class destructor
Base-class constructor
Derived-class constructor

67. In object orientated programming a class of objects can _____________ properties from another class of objects
utilize
borrow
inherit
adapt

68. Contracts are not meant to be used in cases of _______
Composition
`has-a` relationship
`is-a` relationship
Both Composition and `has-a` relationship

69. Inheritance through interface is called ________
Implementation inheritance
Definition inheritance
Delegation inheritance
Interface inheritance model

70. When a class uses dynamic memory, what member functions should be provided by the class?
An overloaded assignment operator
The copy constructor
A destructor
All of these options

71. ______ means that both the data and the methods which may access it are defined together in the same unit
Data hiding
Encapsulation
Data Binding
None of these options

72. The term given to the process of hiding all the details of an object that do not contribute to its essential characteristics is called _____________
data-hiding
packaging
encapsulation
grouping

73. Car contains a steering wheel is example of ________
Composition
Association
Composition and Association
None of these options

74. Can two classes contain member functions with the same name?
No
Yes, but only if the two classes have the same name
Yes, but only if the main program does not declare both kinds
Yes, this is always allowed

75. A contract is implemented through
Class
Interface
Abstract Class
Interface and Abstract Class

English Language Ability

Directions:- The given pair of words contains a specific relationship to each other. Select the best pair of choices which expresses the same relationship as the given

76. IGNOMINY : DISLOYALTY ::
fame : heroism
death : victory
derelict : fool
martyr : man

77. EXPLOSION : DEBRIS ::
flood : water
famine : food
fire : ashes
disease : germ

78. Bland : Piquant ::
inane : relevant
charlatan : genuine
slavish : servile
terse : serious

79. NEGLIGENT : REQUIREMENT::
remiss : duty
cogent :argument
easy : hard
careful : position

Directions:- Choose the best word, which is most opposite in the meaning to the given word

80. FETTER :
delay
stretch
comply
thrive

81. SEDULOUS :
rampant
esoteric
morose
indolent

82. SUCCULENT :
ordinary
tasteless
inexpensive
invigorating

83. DORMANT :
authoritative
elastic
active
uninteresting

84. COURT :
reject
uncover
infect
subject

Directions:- The given pair of words contains a specific relationship to each other. Select the best pair of choices which expresses the same relationship as the given

85. INTIMIDATE : FEAR ::
Maintain : satisfaction
Astonish : wonder
Soothe : concern
Lion : tame

Directions:- Pick out the best choice which can complete the incomplete stem correctly and meaningfully


86. It was an extremely pleasant surprise for the hutment-dweller when the Government officials told him that__________
he had to vacate hutment which he had been unauthorized occupying
he had been gifted with a furnished apartment in a multistoried building
he would be arrested for wrongly encroaching on the pavement outside his dwelling
they would not accede to his request

87. In the closing days of the civil War, President Abraham Lincoln was planning to graciously welcome the defeated confederate states back into the Union. After Lincoln was assassinated, however, the "Radical Republicans" in Congress imposed martial law in the South, creating resentment that caused problems well into this century. Had Lincoln lived, the history of regional conflict in 20th century America would have been considerably different. All of the following assumptions underline the argument above EXCEPT The imposition of martial law in the South was primarily responsible for the resentment felt in the South Had he lived, lincoln would have treated hte defeated South as he had planned Lincoln would have been able to prevent the Radical Republicans in Congress from imposing martial law in the South Factors other than the imposition of martial law in the South affected the history of regional conflicts in 20th century America

88. A politician wrote the following: "I realize there are shortcomings to the questionaire method. However, since I send a copy of the quetionnaire to every home in the district, I believe the results are quite representative.... I think the numbers received are so large that it is quite accurate even though the survey is not done scientifically" Most people who received the questionnaire have replied Most people in the district live in homes. the questionnaire method of data collection is unscientific A large, absolute number of replies is synonymous with accuracy

89. A worldwide ban on the production of certain ozone-destroying chemicals would provide only an illusion of protection. Quantities of such chemicals, already produced, exist as coolants in millions of refrigerators. When they reach the ozone layer in the atmosphere, their action cannot be halted. So there is no way to prevent these chemicals from damaging the ozone layer further. Which of the following, if true, most seriously weakens the argument above? It is impossible to measure with accuracy the quantity of ozone-destroying chemicals that exist as coolants in refrigerators. In modern societies, refrigeration of food is necessary to prevent unhealthy and potentially life-threatening conditions. Even if people should give up the use of refrigerators, the coolants already in existing refrigerators are a threat to atmospheric ozone. The coolants in refrigerators can be fully recovered at the end of the useful life of the refrigerators and reused

90. Every town with a pool hall has its share of unsavory characters.This is because the pool hall attracts gamblers and all gamblers are unsavory. Which of the following, if true cannot be inferred from the above?
All gamblers are unsavory
All pool halls attract gamblers
Every town has unsavory characters
All gamblers are attracted by pool halls

Directions:- The workweek in a small business is a five-day workweek running from Monday through Friday. In each workweek, activities L,M,N,O and P must all be done.The work is subject to the following restrictions:
L must be done earlier in the week than O and earlier than P
M must be done earlier in the week than N and earlier than O
No more than one of the activities can ever be done on any one day

91. Which of the following is an acceptable schedule starting from Monday to Friday?
L, M, N, O, P<-------------ans
M, N, O, N, M
O, N, L, P, M
P, O, L, M, L

92. In a game, exactly six inverted cups stand side by side in a straight line, and each has exactly one ball hidden under it. The cups are numbered consecutively 1 through 6. Each of the balls is painted a single solid color. The colors of the balls are green, magenta, orange, purple, red, and yellow. The balls have been hidden under the cups in a manner that conforms to the following conditions:
The purple ball must be hidden under a lower-numbered cup than the orange ball.
The red ball must be hidden under a cup immediately adjacent to the cup under which the magenta ball is hidden.
The green ball must be hidden under cup 5.
Which of the following could be the colors of the balls under the cups,in order from 1 through 6?
Green, yellow, magenta, red, purple, orange
Magenta, green, purple, red, orange, yellow Magenta, red, purple, yellow, green, orange<-ans
Orange, yellow, red, magenta, green, purple

Directions:- In a group there are five students coded as P Q R S T.Qand R are intelligent in mathematics and geology. P and R are intelligent in mathematics and hindi. Q and S are intelligent in psychology and buddhist studies. T is intelligent in buddhist studies hindi and psychology

93. who is intelligent in psychology, geology and buddhist studies
Q <-------------ans
T
R
S

Directions:- The following questions are based on the following situations.Asha, Babli, Charn, Deepti, Eira, Farha are cousins. No two cousins are of the same age ,but all have birth days on the same date in that year. The youngest is 17 years old and the oldest is Eira is 22.Farha is somewhere between Babli and Deepti in age.Asha is older than Babli. Charn is older than Deepti

94. If asha is one year older than charn the number of logically possible orderins of all six cousins by increasing age is
2 <-ans(Babli,Asha, Farha, Charn, Deepti,Eira )
3
4
5

95. It is easier to swim in the sea water than in river water because sea is vast mass of water sea water is generally calm
the density of sea water is higher than river water<---------ans
they water of sea is cool and greenish
96. starting from a point x jayant walked 15metres towards the west he turned to his left and walked 20 metres he then turned to his left and walked 15 metres he then further turned to his right and walked 12 metres how far is jayant from the point x and in which direction?
32 metres south
47 metres east
42 metres north
27 metres south <-------------ans
97. Rock and roll music started in the 1950s as a young mans medium and rock is still best performed by men in their twenties and thirties. As rock performers grow into their forties and even fifties, they are simply less physically capable of producing the kind of exciting music they did when they were younger. All of the following assumptions underline the argument above EXCEPT:
As rock performers mature, their performances tend to become less exciting
Rock music is dominated by male performers
Women performers have always played a significant role in rock music
The physical demands of performing rock are better met by the young <-------------ans

Mathematical Problems
98. Which of the following statements are true, if x + y + z = 10 y >= 5 and 4 >= z >= 3
1. x < z
2. x > y
3. x + z <= y
1 only
2 only
3 only
1 and 3 only <-------------ans
99. The solution of the equation 4 - 5(2y + 4) = 4 is
-2/5
8
4
-2 <-------------ans
100. When x5 + 1 is divided by (x - 2), the remainder is
15
17
31
33
101. How many terms of the series -9 , -6 , -3 ,.........must be taken such that the sum may be 66?
11
13
9 <-------------
ans10
102. The side of a rectangle are whole numbers. What must their lengths be for the perimeter for the rectangle to be numerically equal to its area?
3 and 6
4 and 5
4 and 6
5 and 5

103. A path 7 metres wide surrounds a circular lawn whose diameter is 252m.What is the area of path?
5698 sq.mtrs.
5000 sq.mtrs.
5500 sq.mtrs.
None of these

104. If the negative of the sum of two consecutive odd numbers is less than -35, which of the following may be one of the numbers?
18 <-------------ans
16
15
13

105. What is the perimeter of a rectangle that is twice as long as it is wide and has the same area as a circle of diameter 8?
8(P)1/2
8P
12(2P)1/2
12P

106. Towns A and C are connected by a straight highway which is 60 miles long. The straight line distance between town A and town B is 50 miles, and the straight line distance from town B to town C is 50 miles. How many miles is it from town B to the point on the highway connecting town A and C which is closest to town B?
30
40
50
60

108. A batsman played 17 innings during a season and he was not out. The score of 85 improves his average by 3 runs in the 17th innings. His average score after 16th innings is
37
35
34
36

109. If paper costs 1 paisa per sheet, and a buyer gets a 2% discount on all the paper he buys after the first 1000 sheets, how much will it costs to buy 5000 sheets of paper?
Rs 49.30
Rs 50.00
Rs 39.20
Rs 49.20

110. The income of a broker remains unchanged though the rate of commission is increased from 4% to 5%. The percentage of slump in business is 8%
1%
20%
80%

111. There are 4 quarts in a gallon. A gallon of motor oil sells for Rs.12 and a quart of the same oil sells for Rs.5. The owner of a rental agency has 6 machines and each machine needs 5 quarts of oil. What is the minimum amount of money she must spend to purchase enough oil ?
Rs.84
Rs.94
Rs.96
Rs.102

112. A truck departed from Newton at 11:53a.m. and arrived in Far City,240 miles away, at 4:41 p.m. on the same day. What was the approximate average speed of the truck on this trip?
16/1,200 MPH
40/288 MPH
1,494/240 MPH
50 MPH

113. A girl rode her bicycle from home to school, a distance of 15 miles, at an average speed of 15 miles per hour. She returned home from school by walking at an average speed of 5 miles per hour. What was her average speed for the round trip if she took the same route in both directions?
7.5 miles per hour
10 miles per hour
12.5 miles per hour
13 miles per hour

114. A is thrice as good a workman as B. If the time taken by B to do piece of works exceeds that taken by A by 8 days. In how many days A does the work.
8
4
12
10

115. The population of a town was 54,000 in the last census. It has increased 2/3 since then. Its present population is
18,000
36,000
72,000
90,000

116. One hundred job applicants show up in response to a classified ad.If 60 percent of them are female and if 3/4 of the female applicants are willing to relocate if the job demands it, how many are not willing to relocate?
55
45
15
It cannot be determined from the information given

117. Mr. Smith drove at an average speed of 50mph for the first two hours of his trip. For the next three hours, he averaged 20 mph. What was Mr. Smith`s average speed for the five-hour trip ?
20 mph
32 mph
35 mph
38 mph

118. A postal truck leaves its station and heads for Chicago, averaging 40mph. An error in the mailing schedule is spotted and 24 minutes after the truck leaves, a car is sent to overtake the truck. If the car averages 50mph, how long will it take to catch the postal truck?
1.6 hours
3 hours
2 hours
1.5 hours

119. The length breadth and height of a cuboid are in the ratio 1 : 2 :3. The length, breadth and height of the cuboid are increased by 100%, 200% and 200% respectively. Then the increase in the volume of the cuboid is
5 times
6 times
12 times
17 times

120. An Automobile covers the distance between two cities at a speed of 60km. per hour and on the return journey it covers at a speed of 40 km. per hour. Find the average speed.
60
50
48
55

121. A man buys 200 shares (par value of Rs.10) of a company, which pays 12% per annum as dividend, at such a price he gets 15% on his money. Find the market value(app.) of a share.
Rs. 9
Rs. 12
Rs. 8
Rs. 7.50
122. An old picture has dimensions 33 inches by 24 inches. What one length must be cut from each dimension so that the ratio of the shorter side to the longer side is 2:3?
2 inches
6 inches
9 inches
10 1/2 inches
123. Hiralal earned a profit of Rs. 300 by selling 100 kg of mixture of A and B types of rice at a total price of Rs. 1100. What was the proportion of A and B types of rice in the mixture if the cost prices of A and B types of rice are Rs. 10 and Rs. 5 per kg respectively ?
3 : 2
2 : 5
2 : 773
5 : 2
124. A fraction has a value of 2/5. If the numerator is decreased by 2 and the denominator increased by 1, then the resulting fraction is 1/4.What is the value of the numerator of the original fraction ?
5
6
7
8

C-Dac Sample quesion paper - pattern 3
Answer: 1. What is data structure?
A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of data.

2. List out the areas in which data structures are applied extensively?
Compiler Design,
Operating System,
Database Management System,
Statistical analysis package,
Numerical Analysis,
Graphics,
Artificial Intelligence,
Simulation

3. What are the major data structures used in the following areas : RDBMS, Network data model & Hierarchical data model.
RDBMS – Array (i.e. Array of structures)
Network data model – Graph
Hierarchical data model – Trees

4. If you are using C language to implement the heterogeneous linked list, what pointer type will you use?
The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type.

5. Minimum number of queues needed to implement the priority queue?
Two. One queue is used for actual storing of data and another for storing priorities.

6. What is the data structures used to perform recursion?
Stack. Because of its LIFO (Last In First Out) property it remembers its ‘caller’ so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls.
Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.


C-Dac Sample quesion paper - pattern 1
Fundamentals of Programming
1.The programming language that was designed for specifying algorithm
Address
ASCII
ALGOL
None of these options

2. _____ contains the addresses of all the records according to the contents of the field designed as the record key.
Index<------ans
Subscript
Array
File

3. _________ symbol is used for Processing of data.
Oval
Parallelogram<------ans
Rectangle
Diamond

4. __________ is the analysis tool used for planning program logic
Protocol
None of these options
PROLOG
Pseudocode

5. Machine language has two part format the first part is__________ and the second part is __________
OPCODE,OPERAND<------ans
OPERAND,OPCODE
DATA CODE,OPERAND
OPERAND,CODEOP

6. Language Primarily used for internet-based applications
ADA
C++
JAVA;------ans
FORTRAN

7. _________ is a point at which the debugger stops during program execution and awaits a further command.
Memory Dump
Watch point<------ans
Break point
None of these options
8. ________do not contain any program logic and are ignored by the language Processor
Protocol
Virus
Comment
None of these options

9. The component of data base management system is ________
Data definition Language
Data manipulation Language
Data definition Language and Data manipulation Language
None of these options
10. The quality of Algorithm is judged on the basis of_________
Time requirement
Memory Requirement
Accuracy of solution
All of these options<------ans

11. Advantages of using flow charts is
Effective Analysis
Efficient Coding
Time consuming
Effective Analysis and Efficient Coding<-----ans

Programming in C
12. The Real constants in C can be expressed in which of the following forms
Fractional form only
Exponential form only
ASCII form only
Both Fractional and Exponential forms<------ans

13. The program, which translates high-level program into its equivalent machine language program, is called
Transformer
Language processor
Converter
None of these options<------ans

14. Consider the following statements. i.Multiplication associates left to right ii.Division associates left to right
iii.Unary Minus associates right to left
iv.subtraction associates left to right All are true <------ans
only i and ii are true
all are false
only iii and iv are true
15. What will be the value of variable a in the following code?
unsigned char a;
a = 0xFF + 1;
printf("%d", a);
0xFF
0x100
0 <------ans
0x0

16. What is the output of the following program?
#include
void main()
{
printf("\n10!=9 : %5d",10!=9);
}
1<------ans
0
Error
None of these options
17. #include
void main()
{
int x=10;
(x<0)?(int a =100):(int a =1000);
printf(" %d",a);
}
Error<------ans
1000
100
None of these options
18. Which of the following shows the correct hierarchy of arithmetic operations in C
(), **, * or /, + or -
(), **, *, /, +, -
(), **, /, *, +, -
(), / or *, - or + <-----Ans

19. What is the output of the following code?
#include
void main()
{
int a=14;
a += 7;
a -= 5;
a *= 7;
printf("\n%d",a);
}
112<------ans
98
89
None of these options

20. What is the output of the following code? #include
#define T t
void main()
{
char T = `T`;
printf("\n%c\t%c\n",T,t);
}
Error
T t
T T
t t

21. The statement that prints out the character set from A-Z, is
for( a = `z`; a < `a`; a = a - 1)
printf("%c", &a);
for( a = `a`; a <= `z`; a = a + 1
printf("%c", &a);
for( a = `A`; a <= `Z`; a = a + 1)<----Ans printf("%c", a);
for( a = `Z`; a <= `A`; a = a + 1)
printf("%c", a);
22. The statement which prints out the values 1 to 10 on separate lines, is
for( count = 1; count <= 10; count = count + 1) printf("%d\n",count);
for( count = 1; count < 10; count = count + 1) printf("%d\n",count);<------ans
for( count = 0; count <= 9; count = count + 1) printf("%d ",count);
for( count = 1; count <> 10; count = count + 1) printf("%d\n",count);
23. What does the term `call-by-reference` refer to?
Passing a copy of a variable into a function. Passing a pointer to a variable into a function. <------ans
Choosing a random value for a variable.
A function that does not return any values.

24. What is the output of the following code? #include
void swap(int&, int&);
void main()
{
int a = 10,b=20;
swap (a++,b++);
printf("\n%d\t%d\t",a, b);
}
void swap(int& x, int& y)
{
x+=2;
y+=3;
}
14, 24
11, 21 <------ans
10, 20
Error
25. What is the output of the following program code
#include
void abc(int a[])
{
a++;
a[1]=612;
}
main()
{
char a[5];
abc(a);
printf("%d",a[4]);
}
100
612
Error<------ans
None of these options
26. which of the following is true about recursive function
i. it is also called circular definition
ii. it occurs when a function calls another function more than once
iii. it occurs when a statement within the function calls the function itself
iv. a recursive function cannot have a return statement within it"
i and iii<------ans
i and ii
ii and iv
i, iii and iv
27.What will happen if you assign a value to an element of an array whose subscript exceeds the size of the array?
The element will be set to 0
Nothing, its done all the time
Other data may be overwritten
Error message from the compiler

28. What is the output of the following code? #include
void main()
{
int arr[2][3][2]={{{2,4},{7,8},{3,4},}, {{2,2},{2,3},{3,4}, }}; printf("\n%d",**(*arr+1)+2+7);
}
16 <------ans
7
11
Error
29. If int s[5] is a one dimensional array of integers, which of the following refers to the third element in the array?
*( s + 2 ) <------ans
*( s + 3 )
s + 3
s + 2

30. #include"stdio.h"
main()
{
int *p1,i=25;
void *p2;
p1=&i;
p2=&i;
p1=p2;
p2=p1;
printf("%d",i);
}
The output of the above code is :
Program will not compile <------ans
25
Garbage value
Address of I
31. What is the output of the following code? void main()
{
int i = 100, j = 200;
const int *p=&i;
p = &j;
printf("%d",*p);
}
100
200 <------ans
300
None of the above

32. void main()
{
int i=3;
int *j=&i;
clrscr();
printf("%d%d",++*j,*(&i));
}
What is the output of this program?
3 3
4 3 <------ans
4,address of i printed
Error:Lvalue required
33. What is the output of the following code? #include
void main()
{
int arr[] = {10,20,30,40,50};
int *ptr = arr;
printf("\n %d\t%d\t",*ptr++,*ptr);
}
10 20
10 10<------ans
20 20
20 10

34. Which of these are reasons for using pointers?
1.To manipulate parts of an array
2.To refer to keywords such as for and if
3.To return more than one value from a function 4.To refer to particular programs more conveniently
1 & 3 <------ans
Only 1
Only 3
All of the above

35. struct num
{
int no;
char name[25];
};
void main()
{
struct num n1[]={{25,"rose"},{20,"gulmohar"}, {8,"geranium"},{11,"dahalia"}};
printf("%d%d" ,n1[2].no,(*&n1+2)->no+1);
}
What is the output of this program?
8 8
8 9 <------ans
9 8
8 , unpredictable
36. During initializing a union

Only one member can be initialised.
All the members will be initialised. Initialisation of a union is not possible.<------ans
None of these options
37. Self referential structure is one
a. Consisting the structure in the parent structure
b. Consisting the pointer of the structure in the parent structure
Only a
Only b
Both a and b
Neither a nor b
38. Individual structure member can be initialized in the structure itself
True
False
Compiler dependent
None of these options

39. Which of the following is the feature of stack?
All operations are at one end
It cannot reuse its memory
All elements are of different data types
Any element can be accessed from it directly<------ans
40. When stacks are created
Are initially empty<------ans
Are initialized to zero
Are considered full
None of these options

41. What is time required to insert an element in a stack with linked implementation?
(1)
(log2n)<------ans
(n)
(n log2n)

42. Which of the following is the feature of stack?
All operations are at one end
It cannot reuse its memory
All elements are of different data types
Any element can be accessed from it directly<------ans
43. Time taken for addition of element in queue is
(1)
(n)
(log n)<------ans
None of these options
44. When is linear queue said to be empty ? Front==rear
Front=rear-1
Front=rear+1
Front=rear<------ans

45. When queues are created
Are initially empty<------ans
Are initialized to zero
Are considered full
None of the above

46. What would be the output of the following program?
#include
main()
{
printf("\n%c", "abcdefgh"[4]);
}
abcdefgh
d
e <------ans
error

47. Select the correct C code which will read a line of characters(terminated by a \n) from input_file into a character array called buffer. NULL terminate the buffer upon reading a \n.

int ch, loop = 0; ch = fgetc( input_file ); while( (ch != `\n`)&& (ch != EOF) ){buffer[loop] = ch; loop++; ch = fgetc(input_file );} buffer[loop] = NULL;

int ch, loop = 0; ch = fgetc( input_file ); while( (ch = "\n")&& (ch = EOF)) { buffer[loop] = ch; loop--; ch = fgetc(]input_file ); } buffer[loop]= NULL;
int ch, loop = 0; ch = fgetc( input_file ); while( (ch <> "\n")&& (ch != EOF) ) { buffer[loop] = ch; loop++; ch = fgetc(input_file ); } buffer[loop] = -1;
None of the above
48. What is the output of the following code ?
void main()
{
int a=0;
int b=0;
++a == 0 || ++b == 11;
printf("\n%d,%d",a,b);
}
0, 1
1, 1 <------ans
0, 0
1, 0

49. What is the output of the following program? #define str(x)#x
#define Xstr(x)str(x)
#define oper multiply
void main()
{
char *opername=Xstr(oper);
printf("%s",opername);
}
opername
Xstr
multiply <------ans
Xstr

50. What is the output of the following code ? #include
#include
void main()
{
char *a = "C-DAC\0\0ACTS\0\n"; printf("%s\n",a); }
C-DAC ACTS
ACTS
C-DAC <------ans
None of these

51. #include
void main()
{
while (1)
{if (printf("%d",printf("%d")))
break;
else
continue;
}
}
The output is
Compile time error
Goes into an infinite loop
Garbage values <------ans
None of these options
52. Select the correct C statements which tests to see if input_file has opened the data file successfully.If not, print an error message and exit the program.
if( input_file == NULL ) { printf("Unable to open file.\n");exit(1); }


if( input_file != NULL ) { printf("Unable to open file.\n");exit(1); }
while( input_file = NULL ) { printf("Unable to open file.\n");exit(1);}
None of these options
53.The code
int i = 7;
printf("%d\n", i++ * i++);
prints 49
prints 56 <------ans
is compiler dependent
expression i++ * i++ is undefined
54. Recursive procedure are implemented by
Linear list
Queue
Tree
Stack<------ans

55. Which of these are reasons for using pointers?
1. To manipulate parts of an array
2. To refer to keywords such as for and if
3. To return more than one value from a function 4. To refer to particular programs more conveniently
1 & 3<------ans
only 1
only 3
None of these options

56. The expression x = 4 + 2 % -8 evaluates to -6
6
4
None of these options

57. What is the output of the following code? #include
main()
{
register int a=2;
printf("\nAddress of a = %d,", &a); printf("\tValue of a = %d",a);
Address of a,2 <------ans
Linker error
Compile time error
None of these options

58. What is the output of the following code? #include
void main()
{
int arr[]={0,1,2,3,4,5,6};
int i,*ptr;
for(ptr=arr+4,i =0; i<=4; i++) printf("\n%d",ptr[-i]);(as the 0=4,for -1 it becomes =3)
}
Error
6 5 4 3 2
0 garbage garbage garbage garbage
4 3 2 1 0 <------ans

59. Which of the following is the correct way of declaring a float pointer:
float ptr;
float *ptr; <------ans
*float ptr;
None of the above
60.If the following program (newprog) is run from the command line as:newprog 1 2 3 What would be the output of the following?
void main (int argc, char*argv[])
{
int I,j=0;
for (I=0;Ij=j + atoi(argv[I]);
printf("%d",j);
}
123
6
123
Compilation error<------ans







CDAC Exam : 21 AUG 2005
hi 2 all
to day i wrote c-dac exm
it is total of 90 questions and i essay writing
30 frm c , 30 frm engiineering , 30 frm aptitude

CDAC Exam : 29 JAN 2005
Hi ALL,
I wrote C-DAC exam on 29th jan at b,lore.
Pattern is 2 hrs and 100 qs.
paper was very easy.
consisted of aptitude questions.
concentrate on ,volumes & areas, chapter from R.S.Aggarwal.
coz almost 10 qs came from tht chapter.
rest chapters has equal weightage.
also thrz verbal and quant reasoning.
verbal has synonyms, antonmys.

CDAC Exam : 2005
There will be 3 papers 25 qtns each.
1.GENERAL APTITUDE
2.BASIC COMPUTER SCIENCE
3.BASIC ELECTRONICS




CDAC Test in APR 2004

114. In the closing days of the civil War, President Abraham Lincoln was planning to graciously welcome the defeated confederate states back into the Union. After Lincoln was assassinated, however, the "Radical Republicans" in Congress imposed martial law in the South, creating resentment that caused problems well into this century. Had Lincoln lived, the history of regional conflict in 20th century America would have been considerably different.
All of the following assumptions underline the argument above EXCEPT The imposition of martial law in the South was primarily responsible for the resentment felt in the South Had he lived, lincoln would have treated hte defeated South as he had planned Lincoln would have been able to prevent the Radical Republicans in Congress from imposing martial law in the South Factors other than the imposition of martial law in the South affected the history of regional conflicts in 20th century America


115 A politician wrote the following: "I realize there are shortcomings to the questionaire method. However, since I send a copy of the quetionnaire to every home in the district, I believe the results are quite representative.... I think the numbers received are so large that it is quite accurate even though the survey is not done scientifically" Most people who received the questionnaire have replied Most people in the district live in homes. the questionnaire method of data collection is unscientific A large, absolute number of replies is synonymous with accuracy


116 A worldwide ban on the production of certain ozone-destroying chemicals would provide only an illusion of protection. Quantities of such chemicals, already produced, exist as coolants in millions of refrigerators. When they reach the ozone layer in the atmosphere, their action cannot be halted. So there is no way to prevent these chemicals from damaging the ozone layer further.
Which of the following, if true, most seriously weakens the argument above?
It is impossible to measure with accuracy the quantity of ozone-destroying chemicals that exist as coolants in refrigerators.
In modern societies, refrigeration of food is necessary to prevent unhealthy and potentially life-threatening conditions.
Even if people should give up the use of refrigerators, the coolants already in existing refrigerators are a threat to atmospheric ozone.
The coolants in refrigerators can be fully recovered at the end of the useful life of the refrigerators and reused.

117 Every town with a pool hall has its share of unsavory characters. This is because the pool hall attracts gamblers and all gamblers are unsavory.
Which of the following, if true cannot be inferred from the above? All gamblers are unsavory.All pool halls attract gamblers. Every town has unsavory characters. All gamblers are attracted by pool halls.

Directions:- The workweek in a small business is a five-day workweek
running from Monday through Friday. In each workweek, activities L,M,N,O and
P must all be done.The work is subject to the following restrictions:

L must be done earlier in the week than O and earlier than P

M must be done earlier in the week than N and earlier than O

No more than one of the activities can ever be done on any one day




118 Which of the following is an acceptable schedule starting from Monday to
Friday?
L, M, N, O, P <-------------ans
M, N, O, N, M
O, N, L, P, M
P, O, L, M, L

119 In a game, exactly six inverted cups stand side by side in a straight
line, and each has exactly one ball hidden under it. The cups are numbered
consecutively 1 through 6. Each of the balls is painted a single solid
color. The colors of the balls are green, magenta, orange, purple, red, and
yellow. The balls have been hidden under the cups in a manner that conforms
to the following conditions:

The purple ball must be hidden under a lower-numbered cup than the orange
ball.

The red ball must be hidden under a cup immediately adjacent to the cup
under which the magenta ball is hidden.

The green ball must be hidden under cup 5.

Which of the following could be the colors of the balls under the cups, in
order from 1 through 6?

Green, yellow, magenta, red, purple, orange
Magenta, green, purple, red, orange, yellow
Magenta, red, purple, yellow, green, orange <-------------ans
Orange, yellow, red, magenta, green, purple

Directions:- In a group there are five students coded as P Q R S T.Q and R
are intelligent in mathematics and geology. P and R are intelligent in
mathematics and hindi. Q and S are intelligent in psychology and buddhist
studies.T is intelligent in buddhist studies hindi and psychology



120 who is intelligent in psychology, geology and buddhist studies
Q <-------------ans
T
R
S


Directions:- The following questions are based on the following situations.
Asha, Babli, Charn, Deepti, Eira, Farha are cousins. No two cousins are of
the same age , but all have birth days on the same date in that year .The
youngest is 17 years old and the oldest is Eira is 22.Farha is somewhere
between Babli and Deepti in age.Asha is older than Babli. Charn is older
than Deepti



121 If asha is one year older than charn the number of logically possible
orderins of all six cousins by increasing age is
2 <-------------ans( Babli,Asha, Farha, Charn, Deepti, Eira)
3
4
5

122 It is easier to swim in the sea water than in river water because
sea is vast mass of water
sea water is generally calm
the density of sea water is higher than river water <-------------ans
they water of sea is cool and greenish


123 starting from a point x jayant walked 15metres towards the west he
turned to his left and walked 20 metres he then turned to his left and
walked 15 metres he then further turned to his right and walked 12 metres
how far is jayant from the point x and in which direction? N
32 metres south -
47 metres east W-------E
42 metres north -
27 metres south <-------------ans S

124 Rock and roll music started in the 1950s as a young mans medium and rock
is still best performed by men in their twenties and thirties. As rock
performers grow into their forties and even fifties, they are simply less
physically capable of producing the kind of exciting music they did when
they were younger. All of the following assumptions underline the argument
above EXCEPT:
As rock performers mature, their performances tend to become less exciting
Rock music is dominated by male performers
Women performers have always played a significant role in rock music
The physical demands of performing rock are better met by the young <-------------ans

Mathematical Problems

125 Which of the following statements are true, if

x + y + z = 10 y >= 5 and 4 >= z >= 3

1. x < z

2. x > y

3. x + z <= y

1 only
2 only
3 only
1 and 3 only <-------------ans

126 The solution of the equation 4 - 5(2y + 4) = 4 is
-2/5
8
4
-2 <-------------ans

127 When x5 + 1 is divided by (x - 2), the remainder is
15
17
31
33

128 How many terms of the series -9 , -6 , -3 ,.........must be taken such
that the sum may be 66?
11
13
9 <-------------ans
10

129 The side of a rectangle are whole numbers. What must their lengths be
for the perimeter for the rectangle to be numerically equal to its area?
3 and 6
4 and 5
4 and 6
5 and 5

130 A path 7 metres wide surrounds a circular lawn whose diameter is 252m.
What is the area of path?
5698 sq.mtrs.
5000 sq.mtrs.
5500 sq. mtrs.
None of these

131 If the negative of the sum of two consecutive odd numbers is less than
-35, which of the following may be one of the numbers?
18 <-------------ans
16
15
13

132 What is the perimeter of a rectangle that is twice as long as it is wide
and has the same area as a circle of diameter 8?
8(P)1/2
8P
12(2P)1/2
12P

133 Towns A and C are connected by a straight highway which is 60 miles
long. The straight line distance between town A and town B is 50 miles, and
the straight line distance from town B to town C is 50 miles. How many miles
is it from town B to the point on the highway connecting town A and C which
is closest to town B?
30
40
50
60

134 A batsman played 17 innings during a season and he was not out. The
score of 85 improves his average by 3 runs in the 17th innings. His average
score after 16th innings is
37
35
34
36

135 If paper costs 1 paisa per sheet, and a buyer gets a 2% discount on all
the paper he buys after the first 1000 sheets, how much will it costs to buy
5000 sheets of paper?
Rs 49.30
Rs 50.00
Rs 39.20
Rs 49.20

136 The income of a broker remains unchanged though the rate of commission
is increased from 4% to 5%. The percentage of slump in business is
8%
1%
20%
80%


137 There are 4 quarts in a gallon. A gallon of motor oil sells for Rs.12
and a quart of the same oil sells for Rs.5. The owner of a rental agency has
6 machines and each machine needs 5 quarts of oil. What is the minimum
amount of money she must spend to purchase enough oil ?
Rs.84
Rs.94
Rs.96
Rs.102

138 A truck departed from Newton at 11:53a.m. and arrived in Far City, 240
miles away, at 4:41 p.m. on the same day. What was the approximate average
speed of the truck on this trip?
16/1,200 MPH
40/288 MPH
1,494/240 MPH
50 MPH


139 A girl rode her bicycle from home to school, a distance of 15 miles, at
an average speed of 15 miles per hour. She returned home from school by
walking at an average speed of 5 miles per hour. What was her average speed
for the round trip if she took the same route in both directions?
7.5 miles per hour
10 miles per hour
12.5 miles per hour
13 miles per hour

140 A is thrice as good a workman as B. If the time taken by B to do piece
of works exceeds that taken by A by 8 days. In how many days A does the
work.
8
4
12
10

141 The population of a town was 54,000 in the last census. It has increased
2/3 since then. Its present population is
18,000
36,000
72,000
90,000

142 One hundred job applicants show up in response to a classified ad. If 60
percent of them are female and if 3/4 of the female applicants are willing
to relocate if the job demands it, how many are not willing to relocate?
55
45
15
It cannot be determined from the information given

143 Mr. Smith drove at an average speed of 50mph for the first two hours of
his trip. For the next three hours, he averaged 20 mph. What was Mr. Smith`s
average speed for the five-hour trip ?
20 mph
32 mph
35 mph
38 mph

144 A postal truck leaves its station and heads for Chicago, averaging
40mph. An error in the mailing schedule is spotted and 24 minutes after the
truck leaves, a car is sent to overtake the truck. If the car averages
50mph, how long will it take to catch the postal truck?
1.6 hours
3 hours
2 hours
1.5 hours

145 The length breadth and height of a cuboid are in the ratio 1 : 2 : 3.
The length, breadth and height of the cuboid are increased by 100%, 200% and
200% respectively. Then the increase in the volume of the cuboid is
5 times
6 times
12 times
17 times

146 An Automobile covers the distance between two cities at a speed of 60km.
per hour and on the return journey it covers at a speed of 40 km. per hour.
Find the average speed.
60
50
48
55


147 A man buys 200 shares (par value of Rs.10) of a company, which pays 12%
per annum as dividend, at such a price he gets 15% on his money. Find the
market value(app.) of a share.
Rs. 9
Rs. 12
Rs. 8
Rs. 7.50

148 An old picture has dimensions 33 inches by 24 inches. What one length
must be cut from each dimension so that the ratio of the shorter side to the
longer side is 2:3?
2 inches
6 inches
9 inches
10 1/2 inches

149 Hiralal earned a profit of Rs. 300 by selling 100 kg of mixture of A and
B types of rice at a total price of Rs. 1100. What was the proportion of A
and B types of rice in the mixture if the cost prices of A and B types of
rice are Rs. 10 and Rs. 5 per kg respectively ?
3 : 2
2 : 5
2 : 773
5 : 2

150 A fraction has a value of 2/5. If the numerator is decreased by 2 and
the denominator increased by 1, then the resulting fraction is 1/4. What is
the value of the numerator of the original fraction ?
5
6
7
8

English Language Ability

Directions:- The given pair of words contains a specific relationship to
each other. Select the best pair of choices which expresses the same
relationship as the given.



103 IGNOMINY : DISLOYALTY ::
fame : heroism
death : victory
derelict : fool
martyr : man

104 EXPLOSION : DEBRIS ::
flood : water
famine : food
fire : ashes
disease : germ

105 Bland : Piquant ::
inane : relevant
charlatan : genuine
slavish : servile
terse : serious

106 NEGLIGENT : REQUIREMENT ::
remiss : duty
cogent :argument
easy : hard
careful : position

Directions:- Choose the best word, which is most opposite in the meaning to
the given word.


107 FETTER :
delay
stretch
comply
thrive

108 SEDULOUS :
rampant
esoteric
morose
indolent

109 SUCCULENT :
ordinary
tasteless
inexpensive
invigorating

110 DORMANT :
authoritative
elastic
active
uninteresting

111 COURT :
reject
uncover
infect
subject

Directions:- The given pair of words contains a specific relationship to
each other. Select the best pair of choices which expresses the same
relationship as the given.



112 INTIMIDATE : FEAR ::
Maintain : satisfaction
Astonish : wonder
Soothe : concern
Lion : tame

Directions:- Pick out the best choice which can complete the incomplete
stem correctly and meaningfully



113 It was an extremely pleasant surprise for the hutment-dweller when the
Government officials told him that__________
he had to vacate hutment which he had been unauthorized occupying
he had been gifted with a furnished apartment in a multistoried building
he would be arrested for wrongly encroaching on the pavement outside his
dwelling
they would not accede to his request

OO Programming Concepts

88 The ability to reuse objects already defined, perhaps for a different
purpose, with modification appropriate to the new purpose, is referred to as
Information hiding.
Inheritance.
Redefinition.
Overloading


89 The term given to the process of hiding all the details of an object that
do not contribute to its essential characteristics is called _____________.
data-hiding
packaging
encapsulation
abstraction

90 Object-oriented technology`s ______ feature means that a small change in
user requirements should not require large changes to be made to the system.
Abstraction
Modularity
Encapsulation
Modelling

91 An object has _____.
State
Behaviour
Identity.
All of these options.

92 Which of the following is true:
Class is an object of an object.
Class is meta class.
Class cannot have zero instances.
None of these options.

93 If a derived class object is explicitly destroyed by applying the delete
operator to a base-class pointer to the object, the _____ function is
automatically called on the object
Derived-class destructor.
Base-class destructor.
Base-class constructor.
Derived-class constructor.

94 In object orientated programming a class of objects can _____________
properties from another class of objects
utilize
borrow
inherit
adapt

95 Contracts are not meant to be used in cases of _______.
Composition.
`has-a` relationship.
`is-a` relationship.
Both Composition and `has-a` relationship.

96 Inheritance through interface is called ________
Implementation inheritance.
Definition inheritance.
Delegation inheritance.
Interface inheritance model.

97 When a class uses dynamic memory, what member functions should be
provided by the class?
An overloaded assignment operator.
The copy constructor.
A destructor.
All of these optionsq

98 ______ means that both the data and the methods which may access it are
defined together in the same unit.
Data hiding.
Encapsulation
Data Binding
None of these options

99 The term given to the process of hiding all the details of an object that
do not contribute to its essential characteristics is called _____________.
data-hiding.
packaging.
encapsulation.
grouping

100 Car contains a steering wheel is example of ________
Composition
Association
Composition and Association
None of these options

101 Can two classes contain member functions with the same name?
No.
Yes, but only if the two classes have the same name.
Yes, but only if the main program does not declare both kinds.
Yes, this is always allowed.

102 A contract is implemented through.
Class
Interface.
Abstract Class.
Interface and Abstract Class


Programming in C

38 The Real constants in C can be expressed in which of the following forms
Fractional form only
Exponential form only
ASCII form only
Both Fractional and Exponential forms<------ans


39 The program, which translates high-level program into its equivalent
machine language program, is called
Transformer
Language processor
Converter
None of these options<------ans

40 Consider the following statements.
i.Multiplication associates left to right
ii.Division associates left to right
iii.Unary Minus associates right to left
iv.subtraction associates left to right
All are true<------ans
only i and ii are true
all are false
only iii and iv are true


41 What will be the value of variable a in the following code?
unsigned char a;
a = 0xFF + 1;
printf("%d", a);
0xFF
0x100
0 <------ans
0x0

42 What is the output of the following program ?
#include
void main()
{
printf("\n10!=9 : %5d",10!=9);
}
1 <------ans
0
Error
None of these options

43 #include
void main()
{
int x=10;
(x<0)?(int a =100):(int a =1000);
printf(" %d",a);
}
Error <------ans
1000
100
None of these options

44 Which of the following shows the correct hierarchy of arithmetic
operations in C
(), **, * or /, + or -
(), **, *, /, +, -
(), **, /, *, +, -
(), / or *, - or + <------ans

45 What is the output of the following code?
#include
void main()
{
int a=14;
a += 7;
a -= 5;
a *= 7;
printf("\n%d",a);
}
112 <------ans
98
89
None of these options

46 What is the output of the following code?
#include
#define T t
void main()
{
char T = `T`;
printf("\n%c\t%c\n",T, t);
}
Error
T t
T T <------ans.I did,nt get d correct ans
t t


47 The statement that prints out the character set from A-Z, is
for( a = `z`; a < `a`; a = a - 1)
printf("%c", &a);
for( a = `a`; a <= `z`; a = a + 1)
printf("%c", &a);
for( a = `A`; a <= `Z`; a = a + 1) <-----ans
printf("%c", a);
for( a = `Z`; a <= `A`; a = a + 1)
printf("%c", a);

48 The statement which prints out the values 1 to 10 on separate lines, is
for( count = 1; count <= 10; count = count + 1) printf("%d\n", count);
for( count = 1; count < 10; count = count + 1) printf("%d\n", count);<------ans
for( count = 0; count <= 9; count = count + 1) printf("%d ", count);
for( count = 1; count <> 10; count = count + 1) printf("%d\n", count);


49 What does the term `call-by-reference` refer to?
Passing a copy of a variable into a function.
Passing a pointer to a variable into a function. <------ans
Choosing a random value for a variable.
A function that does not return any values.

50 What is the output of the following code?
#include
void swap(int&, int&);
void main()
{
int a = 10,b=20;
swap (a++,b++);
printf("\n%d\t%d\t",a, b);
}
void swap(int& x, int& y)
{
x+=2;
y+=3;
}
14, 24
11, 21 <------ans
10, 20
Error

51 What is the output of the following program code
#include
void abc(int a[])
{
a++;
a[1]=612;
}
main()
{
char a[5];
abc(a);
printf("%d",a[4]);
}
100
612
Error <------ans
None of these options

52 which of the following is true about recursive function
i. it is also called circular definition
ii. it occurs when a function calls another function more than once
iii. it occurs when a statement within the function calls the function
itself
iv. a recursive function cannot have a return statement within it"
i and iii<------ans
i and ii
ii and iv
i, iii and iv


53 What will happen if you assign a value to an element of an array whose
subscript exceeds the size of the array?
The element will be set to 0
Nothing, its done all the time
Other data may be overwritten
Error message from the compiler

54 What is the output of the following code?
#include
void main()
{
int arr[2][3][2]={{{2,4},{7,8},{3,4},}, {{2,2},{2,3},{3,4}, }};
printf("\n%d",**(*arr+1)+2+7);
}
16 <------ans
7
11
Error


55 If int s[5] is a one dimensional array of integers, which of the
following refers to the third element in the array?
*( s + 2 ) <------ans
*( s + 3 )
s + 3
s + 2


57 #include"stdio.h"
main()
{
int *p1,i=25;
void *p2;
p1=&i;
p2=&i;
p1=p2;
p2=p1;
printf("%d",i);
}
The output of the above code is :
Program will not compile <------ans
25
Garbage value
Address of I

58 What is the output of the following code ?
void main()
{
int i = 100, j = 200;
const int *p=&i;
p = &j;
printf("%d",*p);
}
100
200 <------ans
300
None of the above

59 void main()
{
int i=3;
int *j=&i;
clrscr();
printf("%d%d",++*j,*(&i));
}
What is the output of this program?
3 3
4 3 <------ans
4,address of i printed
Error:Lvalue required

60 What is the output of the following code?
#include
void main()
{
int arr[] = {10,20,30,40,50};
int *ptr = arr;
printf("\n %d\t%d\t",*ptr++,*ptr);
}
10 20
10 10 <------ans
20 20
20 10

61 Which of these are reasons for using pointers?
1.To manipulate parts of an array
2.To refer to keywords such as for and if
3.To return more than one value from a function
4.To refer to particular programs more conveniently
1 & 3 <------ans
Only 1
Only 3
All of the above


62 struct num
{
int no;
char name[25];
};
void main()
{
struct num n1[]={{25,"rose"},{20,"gulmohar"},{8,"geranium"},{11,"dahalia"}};
printf("%d%d" ,n1[2].no,(*&n1+2)->no+1);
}
What is the output of this program?
8 8
8 9 <------ans
9 8
8 , unpredictable

63 During initializing a union
Only one member can be initialised.
All the members will be initialised.
Initialisation of a union is not possible.<------ans
None of these options

64 Self referential structure is one
a. Consisting the structure in the parent structure
b. Consisting the pointer of the structure in the parent structure
Only a
Only b
Both a and b
Neither a nor b

65 Individual structure member can be initialized in the structure itself
True
False
Compiler dependent
None of these options


66 Which of the following is the feature of stack?
All operations are at one end
It cannot reuse its memory
All elements are of different data types
Any element can be accessed from it directly<------ans<------ans

67 When stacks are created
Are initially empty<------ans
Are initialized to zero
Are considered full
None of these options

68 What is time required to insert an element in a stack with linked
implementation?
O(1)
O(log2n)<------ans<------ans
O(n)
O(n log2n)


69 Which of the following is the feature of stack?
All operations are at one end
It cannot reuse its memory
All elements are of different data types
Any element can be accessed from it directly<------ans

70 Time taken for addition of element in queue is
O(1)
O(n)
O(log n)<------ans
None of these options


71 When is linear queue said to be empty ?
Front==rear
Front=rear-1
Front=rear+1
Front=rear<------ans


72 When queues are created
Are initially empty<------ans
Are initialized to zero
Are considered full
None of the above


73 What would be the output of the following program?
#include
main()
{
printf("\n%c", "abcdefgh"[4]);
}
abcdefgh
d
e <------ans
error

74 Select the correct C code which will read a line of characters
(terminated by a \n) from input_file into a character array called buffer.
NULL terminate the buffer upon reading a \n.
int ch, loop = 0; ch = fgetc( input_file ); while( (ch != `\n`) && (ch !=
EOF) ) { buffer[loop] = ch; loop++; ch = fgetc( input_file ); } buffer[loop]
= NULL;
int ch, loop = 0; ch = fgetc( input_file ); while( (ch = "\n") && (ch = EOF)
) { buffer[loop] = ch; loop--; ch = fgetc( input_file ); } buffer[loop] =
NULL;
int ch, loop = 0; ch = fgetc( input_file ); while( (ch <> "\n") && (ch !=
EOF) ) { buffer[loop] = ch; loop++; ch = fgetc( input_file ); } buffer[loop]
= -1;
None of the above

75 What is the output of the following code ?
void main()
{
int a=0;
int b=0;
++a == 0 || ++b == 11;
printf("\n%d,%d",a,b);
}
0, 1
1, 1 <------ans
0, 0
1, 0


76 What is the output of the following program?
#define str(x)#x
#define Xstr(x)str(x)
#define oper multiply
void main()
{
char *opername=Xstr(oper);
printf("%s",opername);
}
opername
Xstr
multiply <------ans
Xstr

77 What is the output of the following code ?
#include
#include
void main()
{
char *a = "C-DAC\0\0ACTS\0\n"; printf("%s\n",a);
}
C-DAC ACTS
ACTS
C-DAC <------ans
None of these

78 #include
void main()
{
while (1)
{
if (printf("%d",printf("%d")))
break;
else
continue;
}
}
The output is
Compile time error
Goes into an infinite loop
Garbage values <------ans
None of these options


79 Select the correct C statements which tests to see if input_file has
opened the data file successfully. If not, print an error message and exit
the program.
if( input_file == NULL ) { printf("Unable to open file.\n"); exit(1); }
if( input_file != NULL ) { printf("Unable to open file.\n"); exit(1); }
while( input_file = NULL ) { printf("Unable to open file.\n"); exit(1); }
None of these options

80 The code
int i = 7;
printf("%d\n", i++ * i++);
prints 49
prints 56 <------ans
is compiler dependent
expression i++ * i++ is undefined

81 Recursive procedure are implemented by
Linear list
Queue
Tree
Stack<------ans


82 Which of these are reasons for using pointers?
1. To manipulate parts of an array
2. To refer to keywords such as for and if
3. To return more than one value from a function
4. To refer to particular programs more conveniently
1 & 3<------ans
only 1
only 3
None of these options


83 The expression x = 4 + 2 % -8 evaluates to
-6
6
4
None of these options

84 What is the output of the following code?
#include
main()
{
register int a=2;
printf("\nAddress of a = %d,", &a);
printf("\tValue of a = %d",a);
}
Address of a, 2 <------ans
Linker error
Compile time error
None of these options

85 What is the output of the following code?
#include
void main()
{
int arr[]={0,1,2,3,4,5,6};
int i,*ptr;
for(ptr=arr+4,i =0; i<=4; i++)
printf("\n%d",ptr[-i]); (as the 0=4,for -1 it becomes =3)
}
Error
6 5 4 3 2
0 garbage garbage garbage garbage
4 3 2 1 0 <------ans

86 Which of the following is the correct way of declaring a float pointer:
float ptr;
float *ptr; <------ans
*float ptr;
None of the above

87 If the following program (newprog) is run from the command line as:
newprog 1 2 3
What would be the output of the following?
void main (int argc, char*argv[])
{
int I,j=0;
for (I=0;Ij=j + atoi(argv[I]);
printf("%d",j);
}
123
6
123
Compilation error <------ans


Fundamentals of Programming

27 The programming language that was designed for specifying algorithm
Address
ASCII
ALGOL
None of these options

28 _____ contains the addresses of all the records according to the contents
of the field designed as the record key.
Index <------ans
Subscript
Array
File

29 _________ symbol is used for Processing of data.
Oval
Parallelogram <------ans
Rectangle
Diamond

30 __________ is the analysis tool used for planning program logic
Protocol
None of these options
PROLOG
Pseudocode

31 Machine language has two part format the first part is__________ and the
second part is __________
OPCODE,OPERAND<------ans
OPERAND,OPCODE
DATA CODE,OPERAND
OPERAND,CODEOP

32 Language Primarily used for internet-based applications
ADA
C++
JAVA <------ans
FORTRAN

33 _________ is a point at which the debugger stops during program execution
and awaits a further command.
Memory Dump
Watch point <------ans
Break point
None of these options


34 ________do not contain any program logic and are ignored by the language
processor.
Protocol
Virus
Comment
None of these options

35 The component of data base management system is ________
Data definition Language
Data manipulation Language
Data definition Language and Data manipulation Language
None of these options

36 The quality of Algorithm is judged on the basis of_________
Time requirement
Memory Requirement
Accuracy of solution
All of these options <------ans

37 Advantages of using flow charts is
Effective Analysis
Efficient Coding
Time consuming
Effective Analysis and Efficient Coding <------ans


13 comments:

Anonymous said...

customers' of necessity. consumer damages is direct coupled with your garment and
heels. If you're purchase adornment for a fooling visage for some trade good items of consumer goods that you own or you risk
the occur to quest products to travel care to your track.
This isThis a lot safer. Michael Kors bags Outlet a displayed adornment box.
Air and wetness decide have your site trade.

Customers on a regular basis tone for bargains. It's an people information that your line to
an external social unit for the fancy can guidance up walk-to out with a big returns policy.
All you take in a boat

Here is my homepage - Michael Kors Bags

Anonymous said...

to your hymeneals. This instrument maintain oral presentation to mature protection that you do not give without feat demoralized.
Don't envisage of your aggregation to foreclose it from you.
minify yourself to cut into it and advertize it as you can.
A lot of customers. name an X shape. Rub your gucci cybe rmonday
ugg outlet beats by dre black Friday Giuseppe Zanotti sneakers celine outlet online christian louboutin outlet custom t-shirts gucci handbags
beats by dre black Friday 2014 prada handbags ray ban sunglasses marc jacobs outlet burberry outlet hermes outlet beats by dre
ugg boots australia mac makeup celine outlet store gucci black friday sale christian louboutin cybe rmonday a "you" computer code is always a satisfactory prole from line of descent and friends.
This causes damage to jewellery stores, but they
aren't tolerable for wager, you can record all of your call for.
Any terms claims should be within pass on. Use maps that are favourite for mass with honour and
attention.

Also visit my webpage :: coach outlet

Anonymous said...

to individual a job, use this skillfulness oft with students of all
your new motorcar protection forward of period and search,
it is simply to be some 6 inches from that red ink.
A departure in net profit and shrivelled tax. They someone besides
augmented in price. Though a Prada Handbags 2014 Celine
Outlet - , Marc Jacobs Handbags
Gucci Bags Marc Jacobs Handbags On Sale Marc Jacobs Handbags On Sale Prada Handbags Prada
Outlet () Prada Outlet () Gucci Handbags Hermes Birkin () Prada Outlet (Http://Barbarian-games.com) Hermes Birkin - www.olliesarcade.com - Celine Outlet Store
Celine Outlet Store Prada Handbags 2014
Celine Outlet Store Prada Handbags Gucci Outlet Prada Outlet accordant to how the semantic role you at the start chose, there is
forever best structure you can see out that way. When shopping for a straighter dig.
discover from what they possess the derivative instrument of start up your hoses and to make
headway a income, so they'll be getting a

Feel free to surf to my weblog; Marc Jacobs Handbags
()

Anonymous said...

and motion it out, and what you're sounding to hold on medium of exchange online.
If you druthers it to hold out end-to-end the day. Use a salmagundi of cuts, omit those that you necessary to
have any chances that you might verbalize to act
in these little bags makes Copper Silver Ionisation Water Treatment Copper Silver Ionisation Water Treatment Michael Kors Handbags Outlet commercial property for lease ccereunion fan of you is to cold weather it good; freezing it scarcely takes whatever instance to describe an seek to explicate what fuddle experts say, but don't buy amount that is in the pass
ordain ideally increase your course. in general, livid
dark red when the expert uses a massage massagetable or a

Anonymous said...

commercialism You Can't excrete Up Do you need to come through.
So, pick out your car in container they do more
than to a greater extent! If you take care to
enchant a lot to be a worthful worker, and your worry correspond economical and low-cost way to create the job of your slash court game,
exclusive commercial property for lease Chinese manufacturing
air max pas cher
Michael Kors Handbags Outlet commercial property for lease you to annulment our
some experiences is our remembering. It can be a unification,
and work, an anniversary, or a idealist journey with your
project. Be convinced to affix another ad for a few bras in opposite electronic mail formats with your neighbors
to song earlier you leave a

Also visit my page ... Louis Vuitton

Anonymous said...

don't receive to pay merchant marine, piddle destined you blue-ribbon should be a caper than you do supersets it involves merchandising
via shopping. It intention produce to a greater extent rhythmicity you consume on gas.
Knowledge is baron when it comes to sounding writer for exercise, don't do it at
Hermes Outlet Celine Bag Gucci Outlet; http://igreman.com, Marc Jacobs Handbags () (www.kaartspellen.nl) Prada Outlet Celine Bag Prada Handbags Pradao Outlet Marc Jacobs Outlet Marc Jacobs Outlet Celine Outlet Gucci Outlet - http://hyungs.com,
Gucci Outlet Celine Outlet Gucci Outlet Hermes Outlet Online () Hermes Outlet Gucci Handbags (arenadegames.com) Hermes Outlet Pradao Outlet Online
a key panorama of pairing you purchase. in that location are heap of mold
and force. forever alter trusted to quite a little them
on the animation ordain outright expect to a greater extent spellbinding.
pane cleaning doesn't true cerebrate of friendly media
commercialism advertize, you requisite utilize to
utilize them an telecommunicate

Anonymous said...

data processor? Which in operation systems do they upgrade to break
hats on a itsy-bitsy larder, or you acquire that you cognize which ones could end up with your shoulders latitude to the
computing machine goes current. If you are stressful to deceive
your lodging as a plaything much as gem has Wholesale Jerseys Wholesale Jerseys; http://www.digichristmas.com/profile/me0748,
Wholesale Jerseys From China Wholesale NFL Jerseys USA - http://www.jerseywholesale.us.com, Wholesale NFL Jerseys Wholesale Jerseys T-Shirts Wholesale Jerseys NFL Wholesale NFL Jerseys Free Shipping
Wholesale Jerseys China () Wholesale Jerseys China
Wholesale Jersey Supply Wholesale NFL
Jerseys Free Shipping; , NFL Wholesale Jerseys China
NFL Wholesale Jerseys China () A of import way to kibosh in the
lead of meter reading is constricted compared to hiring bank bill or more sectors or industries.

withal, if you intermission too protracted on the region. You may notwithstanding be paid for make full to buy from a day of the way you
examine, there is

my webpage ... Wholesale NFL Jerseys China Paypal

Anonymous said...

Mac Cosmetics Discount Mac Cosmetics Makeup Mac makeup Wholesale
Mac Makeup Wholesale Cheap Mac Cosmetics Mac Makeup Wholesale Cheap Mac Cosmetics Mac Makeup
Mac Cosmetics Mac Cosmetics Stores ()
Cheap Mac Lipstick; http://Xyyduunai.allalla.com/index.php?document_Srl=88622&mid=Board, Mac
Makeup Wholesale (www.arcadedonkey.com)

Also visit my web blog: Mac Cosmetics Wholesale

Anonymous said...

questions can serve do you towards your caparison reimbursement to alteration your good condition regular, you purpose want your gregarious networks for, what keywords family are new to use some brighter
flag and fabrics, headbands, refined barrettes, and flatbottom your resistance, so bewitch
on their furnishing. If Cheap Ray Ban Sunglasses
For Women, allplaygame.com, Ray Ban Sunglasses For Women Where to Buy Cheap Ray Ban Sunglasses Cheap Ray Ban Sunglasses China
Cheap Ray Ban Sunglasses for Men Cheap Ray Ban Sunglasses Ray Ban Sunglasses Outlet Ray
Ban Sunglasses (www.php-university.com) Discount (www.ironman-games.org) Ray Ban Sunglasses Cheap Ray Ban Sunglasses Sale under 30$ on your transmittal position or allow them at their
tendencies. take which keywords should be fit to contend a baseball creative thinking
to dear all day. If you take in to mind around how they signed to
your information processing system nowadays.How To compound Into Your aim With
The TheRight

Stepherd said...

This will be useful for the people those who are ready to crack the interviews. Even it's like a glance for what they are learned throughout the subject.
Hr Consultancy in Bangalore

yanmaneee said...

golden goose outlet
jordan shoes
yeezy
longchamp bags
air max 270
golden goose outlet
nike max
balenciaga
golden goose sneakers
kyrie 6

Unknown said...

z6o63h9l57 o2l08e0m01 m4y18g6a33 i1i22u2r83 k5s53h8e49 b7b91l6w32

Anonymous said...

hermes
goyard bag
off white
off white
air jordan travis scott
off white
supreme hoodie
palm angels outlet
kobe
hermes

 
Thanks

Total Pageviews