CSC 2
CSC 2
CSC 2
Ans-B
Most important advantage of an IC is its Easy replacement in case of circuit failure Extremely high reliability Reduced cost Low power consumption None of the above Which programming language is much in vogue among users of microcompu ALGOL APL LOGO FORTH None of the above Multiplication of 1112 by 1012 is 1100112 1000112 1111002 0001012 None of the above
4. A computer-controlled device for training exercises that duplicates t he work environment is a: A. simulator B. duplicator C. trainer D. COM device E. None of the above Ans-A 5. The latest PC keyboards use a circuit that senses the movement by the change in its capacitance. What are these keyboards called? A. Capacitance keyboards B. Mechanical keyboards C. Qwerty keyboards D. Dvorak keyboards E. None of the above Ans-A 6. Find the output of the program char *foo() { char result[100]); strcpy(result, anything is good ); return(result); } void main() { char *j; j=foo() printf( %s ,j); } 7. Find the output of the program void main() {
char *s[]={ dharma , hewlett-packard , siemens , ibm }; char **p; p=s; printf( %s ,++*p); printf( %s ,*p++); printf( %s ,++*p); } 8. 9. write 7*a in terms of +,-,<< What is Creon and what is the difference between at command.
10. Find the output of the program main(){ char *s1 = hello ,*s2 = abce ; strcpy(s1, "); s2[0] = s1[0]; printf( %d%d ,strlen(s1),strlen(s2)); } 11. A. B. C. D. E. Ans-A What was originally called the imitation game The Turing Test LISP The Logic Theorist Cybernetics None of the above by its creator?
12. Find the output of the program void main() { unsigned i=1; /* unsigned char k= -1 => k=255; */ signed j=-1; /* char k= -1 => k=65535 */ /* unsigned or signed int k= -1 =>k=65535 */ if(i<j) printf( less ); else if(i>j) printf( greater ); else if(i==j) printf( equal ); } Ans-less 13. s A. B. C. D. E. Ans-B 14. A. B. C. D. E. A number that is used to control the form of another number is known a Map Mask Mamtossa Marker None of the above ASCII stands for American standard code for information interchange All purpose scientific code for information interchange American security code for information interchange American Scientific code for information interchange None of the above
Ans-A 15. A. B. C. D. E. Ans-A 16. A. B. C. D. E. Ans-A 17. A. B. C. D. E. Ans_C 18. A. B. C. D. E. Ans_B 19. A. The list of coded instructions is called Computer program Algorithm Flowchart Utility programs None of the above In LISP, the atom that stands for t ml y time None of the above true is
Which two files are used during operation of the DBMS? query language and utilities data manipulation language and query language data dictionary and transaction log data dictionary and query language None of the above A network schema restricts the structure to a one-to-many relationship permits many-to-many relationships stores data in tables All of the above None of the above
self-relocating program is one which cannot be made to execute in any area of storage other than the one designated for it at the time of it s coding or translation B. consists of a program and relevant information for its relocation C. can itself perform the relocation of its address-sensitive portions D. All of the above Ans-C 20. . Write a program to exchange the values of two variables using pointers
21. Write program to open one file input some numbers and find smallest, l argest, avg. and store them in another file 22. Write a program to reverse a string co-ordinate geometry.
23. Find the output of the program #include main() { int x=20, t; &t=x; x=50; cout<<x<< <<t; }
What hardware architectures are not supported by Ret Hat? SPARC IBM-compatible Alpha Macintosh None of the above What command do you use to create Linux file systems? fdisk mkfs fsck mount None of the above
26. Find the output of the program #include<stdio.h> main() { char *p1; char *p2; p1=(char *) malloc(25); p2=(char *) malloc(25); strcpy(p1, Ramco ); strcpy(p2, Systems ); strcat(p1,p2); printf( %s ,p1); } 27. What command is used to count just the number of lines contained in a file?(Linux) A. wc r B. wc w C. wc c D. wc l E. None of the above Ans-D 28. The probability that a single bit will be in error on a typical public telephone line using 4800 bps modem is 10 to the power -3. If no error detectio n mechanism is used, the residual error rate for a communication line using 9-bi t frames is approximately equal to A. 0.003 C. 0.991 B. 0.009 D. 0.999 Ans-B 29. a medium A. B. C. D. E. Ans-B which of the following condition is used to transmit two packets over at the same time? Contention Collision Synchronous Asynchronous None of the above
input m,n,z TEST:if ((m+n)/3>5)z=z+1 else z =z-1 printf m,n,z { (m-m+1;n=n-3) if (m+n+2)>14 then goto test print m,n,z end } 30. How many times the TEST exacted if the input is 1,18,2? Ans- four times 31. What are the values taken by Z when input being 8,24,1? a) only 5 b) only 6 c) neither 5 or 6 d) both 5 and 6 ans-D. 32. what is the final output if the input is 1,18,2? (m,n,z) ans- 5,6,2 33. a)1,8,4 ans=C. 34. How many times is TEST execute ed if the input is 2,14,1? ans) twice 35. What will be thethe remainder when 9FA (hexa) is divided by 8 is added to the 12(to base ten) to get x.then x has the binary operation 36. Find the odd man out a) Intel ans =nec b)motorola c)nec d)Ibm what is the final output of the if the input is 2,14,12 (m,n,z) b)1,4,8 c)4,8,1 d )8,4,2
37. Find the output of the program main() { int i=3 printf ("%d %d %d ",++i,i-,i+=5); } 38. Find the output of the program main() { int times =5; int i=3; int j=4; int k=34; i=j+k; while(times ) { i=times j=times k=times } printf("%d %d %d " ,i,j,k) }
39. Find the output main() { int number =25; char name = A printf( The addition of the name and the number is %o name +_number) } Ans-Compiler error 40. a) b c) d ans)D 41. 42. 43. tions? 44. 45. 46. computer viruses can spread from one system to anther by means of Infected disks )links to a network downloaded program from a bulletin board )all of the program what do you mean by exception handling? What are pure virtual functions?
What is the difference between member functions and static member func What is the4 difference between delete[] and delete? Difference between function overloading and function overriding. How to invoke a C function using a C++ program?
47. Convert 0.9375 to binary a) 0.0111 b) 0.1011 c) 0.1111 d) none Ans. (c) 48. In a) if (X==0) b) if (X!=0) c) if (X==0) Ans. (b) C, X ? Y : Z Y ;else Z Y ;else Z Y ; Z is equal to
49. The following function gives some error. What changes have to be made void ( int a,int b) { int t; t=a; a=b; b=t; } a) define void as int and write return t b) change everywhere a to *a and b to *b 50. Which of the following is incorrect a) if a and b are defined as int arrays then (a==b) can never be true b) parameters are passed to functions only by values c) defining functions in nested loops 51. #include<stdio.h> void swap(int*,int*); main() { int arr[8]={36,8,97,0,161,164,3,9}
for (int i=0; i<7; i++) { for (int j=i+1; j<8;j++) if(arr[i]<arr[j]) swap(&arr[i],&arr[j]); } } void swap(int*x,int*y) { int temp; static int cnt=0; temp= *x; *x=*y; *y=temp; cnt++; } What is cnt equal to 52. int main() { FILE *fp; fp=fopen( test.dat , w ); fprintf(fp, hello\n ); fclose(fp); fp=fopen ( test.dat , w ); fprintf (fp, world ); fclose(fp); return 0; } If text.dat file is already present after compiling and execution how many bytes does the file occupy ? a) 0 bytes b) 5 bytes c) 11 bytes d) data is insufficient 53. Find the output of the program f1(int*x,intflag) int *y; *y=*x+3; switch(flag) { case 0: *x=*y+1; break; case 1: *x=*y; break; case 2: *x=*y-1; break; } return(*y) main() { *x=5; i=f1(x,0); j=f1(x,1); printf( %d %d %d ,i,j,*x); } 54. What does the following program print? #include <stio.h>
int sum,count; void main(void) {< BR> for(count=5;sum+= count;) printf( %d ,sum); } 55. What is the output of the following program? #include <stdio.h> void main(void) { int i;< BR> for(i=2;i<=7;i++) printf( %5d ,fno()); } fno() { staticintf1=1,f2=1,f3; return(f3=f1+f2,f1=f2,f2=f3); } 56. What is the output of the following program? #include <stdio.h> #include <string.h> int foo(char *); void main (void) { char arr[100] = { Welcome to CSC }; foo (arr); } foo (char *x) { printf ( %d\t ,strlen (x)); printf ( %d\t ,sizeof(x)); return0; } 57. What is the output of the following program? #include <stdio.h> #define sum (a,b,c) a+b+c #define avg (a,b,c) sum(a,b,c)/3 #define geq (a,b,c) avg(a,b,c) >= 60 #define lee (a,b,c) avg(a,b,c) <= 60 #define des (a,b,c,d) (d==1?geq(a,b,c):lee(a,b,c)) void main (void) { int num = 70; char ch = 0'; float f = 2.0; if des(num,ch,f,0) puts ( lee.. ); else puts( geq ); } 58. What does the following program print? #include <stdio.h> char *rev(int val); void main(void) { extern char dec[]; printf ( %c , *rev); } char *rev (int val)
{ char dec[]= abcde ; return dec; } 59. What does the following program print? #include<stdio.h> void main(void) { enum sub { chemistry, maths, physics }; struct result { char name[30]; enum sub sc; }; struct result my_res; strcpy (my_res.name, Patrick ); my_res.sc=physics; printf( name: %s\n ,my_res.name); printf( pass in subject: %d\n ,my_res.sc); } 60. What is the output of the following program? #include <stdio.h> void swap (int x, int y, int t) { t = x; x = y; y = t; printf ( x inside swap: %d\t y inside swap : %d\n ,x,y); } void main(void) { int x; int y; int t; x = 99; y = 100; swap (x,y,t); printf ( x inside main:%d\t y inside main: %d ,x,y); } a. x inside swap : 100 y inside swap : 99 x inside main : b. x inside swap : 100 y inside swap : 99 x inside main : c. x inside swap : 99 y inside swap : 100 x inside main : d. x inside swap : 99 y inside swap : 100 x inside main : e. Not sure 61. What does the following program print? #include <stdio.h> struct my_struct { int p:1; int q:1; int r:6; int s:2; }; struct my_struct bigstruct;
100 y inside main : 99 99 y inside main : 100 99 y inside main : 100 100 y inside main : 99
struct my_struct1 { char m:1; }; struct my_struct1 small struct; void main (void) { printf ( %d %d\n ,sizeof (bigstruct),sizeof (smallstruct)); } 62. What is the output of the following program? #include <stdio.h> void main (void) { short x = 03333; short y = 04321; long z = x; z = z << 16; z = z | y; printf( %1x\t ,z); z = y; z = z >> 16; z = z | x; printf( %1x\t ,z); z = x; y = x && y; z = y; printf( %1x\t ,z); } 63. What is the output of the following program? #include <stdio.h> void main (void) { char *p = Bangalore ; #if 0 printf ( %s , p); #endif } 64. What is the return type of calloc function? a. int * b. void * c. no return type: return type is void d. int e. Not sure 65. If x is declared as an integer, y is declared as float, consider the f ollowing expression: y = *(float *)&x; Which one of the following statments is true? a. the program containing the expression produces compilation errors; b. the program containing the expression produces runtime errors; c. the program containing the expression compiles and runs without any errors; d. none of the above e. Not sure 66. A. B. C. Which of the following refers to the associative memory? the address of the data is generated by the CPU the address of the data is supplied by the users there is no need for an address i.e. the data is used as an address
D. E. Ans-C 67. taneously A. B. C. D. E. Ans-B 68. ity? A. B. C. D. E. Ans-A 69. A. B. nd C. D. E. Ans-D 70. to rise: A. B. C. D. E. Ans-D
the data are accessed sequentially None of the above To avoid the race condition, the number of processes that may be simul inside their critical section is 8 1 16 0 None of the above Which one of the following kinds of materials has the lowest permeabil A diamagnetic material A paramagnetic material A feiTomagnetic material All of the above None of the above he total impedance of a parallel RLC circuit: always increases as the applied frequency increases is equal to the sum of the values of resistance, inductive reactance a capacitive reactance always decreases as the applied frequency increases is maximum at the resonant frequency None of the above he rise time of a pulse waveform is the time required for the voltage from zero to its rms value from zero to its peak value from 10% of the peak value to 70.7% of the peak value from 10% of the peak value to 90% of the peak value None of the above
71. Which of the following is(are) true of the EDP auditors? A. they should have computer expertise B. they will be replaced by traditional auditors in the near future C. two of the above D. currently, there is a very high demand for them, particularly from fir ms that use personal computers E. None of the above Ans-A 72. A. B. C. D. E. Ans-D A lockbox service is used for depositing cash when bank is closed paying bank customer bills automatically storing papers in a bank vault depositing payments to bank customers None of the above
73. Which of the following symbol modes are used to input of graphics to G eneral CAD system? A. Live and Rectangle mode
B. C. D. E. Ans-D
Arc and Circle mode Dimension and Alphanumeric mode All of the above None of the above
74. What will be the output of the program? public class Test { public static int y; public static void foo(int x) { System.out.print( foo ); y = x; } public static int bar(int z) { System.out.print( bar ); return y = z; } public static void main(String [] args ) { int t = 0; assert t > 0 : bar(7); assert t > 1 : foo(8); /* Line 18 */ System.out.println( done ); } } Ans-foo done 75. A. B. C. D. Ans-A Aptitude 1. One year ago, the ratio of Roonie s and Ronaldo s age was 6: 7 respective ly. Four years hence, this ratio would become 7: 8. How old is Ronaldo ? Ans-36 years 2. In what ratio must rice at Rs. 9.30 per kg be mixed with rice at Rs. 10.80 per kg so that the mixture be worth Rs. 10 per kg ? Ans-8:7 3. The milk and water in two vessels A and B are in the ratio 4 : 3 and 2: 3 respectively. In what ratio, the liquids in both the vessels be mixed to ob tain a new mixture in vessel C containing half milk and half water? Ans-7:5 4. One side of a rectangular field is 15 m and one of its diagonals is 1 7 m. Find the area of the field. Ans-120m2 5. A rectangular grassy plot 110 m. by 65 m has a gravel path 2.5 m wide all round it on the inside. Find the cost of gravelling the path at 80 paise pe r sq. metre Which int a int b int c int d of the following would compile without error? = Math.abs(-5); = Math.abs(5.0); = Math.abs(5.5F); = Math.abs(5L);
Ans- Rs 680 6. There are two sections A and B of a class consisting of 36 and 44 stu dents respectively. If the average weight of section A is 40kg and that of secti on B is 35kg, find the average weight of the whole class? Ans-37.25 kg 7. Of the three numbers, second is twice the first and is also thrice th e third.If the average of the three numbers is 44.Find the largest number. Ans-72 8. Find the odd man out.
3, 5, 11, 14, 17, 21 Ans-14 9. Find out the wrong number in the given sequence of numbers. 1, 8, 27, 64, 124, 216, 343 Ans-124
10. Insert the missing number. 8, 7, 11, 12, 14, 17, 17, 22, ( .) Ans-B 11. Two cards are drawn at random from a pack of 52 cards.what is the prob ability that either both are black or both are queen? Ans-55/221 12. A bag contains 6 white and 4 black balls .2 balls are drawn at random. find the probability that they are of same colour. Ans-7/15 13. . In a km race, A beats B by 28 metres or 7 seconds. Find A s time over the course. Ans-4 min 3 sec 14. A, Band C are three contestants in a km race. If A can give B a start of 40 m and A can give C a start of 64m how many metre s start can B give C ? 15. If a : b = 5 : 9 and b : c = 4: 7, find a : b : c. Ans-20:36:63 16. A bag contains 50 p, 25 P and 10 p coins in the ratio 5: 9: 4, amounti ng to Rs. 206. Find the number of coins of each type Ans- Number of 50 p coins = 360; Number of 10 p coins = 160 17. A. B. C. D. Ans-C 18. A. B. C. What was the day of the week on 17th June, 1998? Monday Tuesday Wednesday Thursday The calendar for the year 2007 will be the same for the year: 2014 2016 2017
D. Ans-D
2018
19. Find the angle between the hour hand and the minute hand of a clock wh en 3.25. 20. At what time between 4 and 5 o clock will the hands of a clock be at rig ht angle? Ans-40/11 min. past 4. 21. Find at what time between 8 and 9 o clock will the hands of a clock bein g the same straight line but not together Ans-120/11 min 22. Find compound interest on Rs. 7500 at 4% per annum for 2 years, compou nded annually. Ans-RS612 23. Find the compound interest on Rs. 10,000 in 2 years at 4% per annum, t he interest being compounded half-yearly. Ans-Rs 824.32 24. In what time will Rs. 1000 become Rs. 1331 at 10% per annum compounded annually? Ans-3 years 25. The difference between the compound interest and simple interest on a certain sum at 10% per annum for 2 years is Rs. 631. Find the sum. Ans- Rs631,00 26. The sum of a rational number and its reciprocal is 13/6. Find the numb er Ans-2/3 ot 3/2 27. If the sum of two numbers is 42 and their product is 437, then find th e absolute difference between the numbers Ans-4 28. The average of four consecutive even numbers is 27. Find the largest of these numbers. Ans-30 29. Of two numbers, 4 times the smaller one is less then 3 times the 1arge r one by 5. If the sum of the numbers is larger than 6 times their difference b y 6, find the two numbers. Ans-59 & 43 30. If three numbers are added in pairs, the sums equal 10, 19 and 21. Fin d the numbers Ans-6, 4 & 15 31. Simplify : (ii) 11992 7823 456 32. (i) 8888 + 888 + 88 + 8
What could be the maximum value of Q in the following equation? 5P9 + 3R7 + 2Q8 = 1114 Ans-9 33. An electric pump can fill a tank in 3 hours. Because of a leak in ,the tank it took 3(1/2) hours to fill the tank. If the tank is full, how much time
will the leak take to empty it Ans-21 hrs 34. Two pipes A and B can fill a tank in 36 min. and 45 min. respectively. A water pipe C can empty the tank in 30 min. First A and B are opened. after 7 min,C is also opened. In how much time, the tank is full? Ans-39 min 35. Simplify :(log 75/16-2 log 5/9+log 32/243)
36. Find the value of x which satisfies the relation Log10 3+log10 (4x+1)=log10 (x+1)+1 Ans-7/2 37. If log10 2=0.30103,find the value of log10 50 Ans-1.69897 38. Peter can cover a certain distance in 1 hr. 24 min. by covering two-th ird of the distance at 4 kmph and the rest at 5 kmph. Find the total distance. Ans-6 km 39. Arrange the fractions 5/8, 7/12, 13/16, 16/29 and 3/4 in ascending ord er of magnitude. Ans-16/29 < 7/12 < 5/8 < 3/4 < 13/16 40. Complete the sudoku