0% found this document useful (0 votes)
193 views12 pages

HP Placement Paper 2 - Freshers Choice

The document contains a series of questions related to programming concepts in C language. It includes questions on proper sequencing, grammar, spelling, logical reasoning and C programming concepts like data types, operators, functions, loops etc. The output provided for code snippets tests understanding of variable scope, precedence of operators, return values of functions and control flow.

Uploaded by

fresherschoice
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
0% found this document useful (0 votes)
193 views12 pages

HP Placement Paper 2 - Freshers Choice

The document contains a series of questions related to programming concepts in C language. It includes questions on proper sequencing, grammar, spelling, logical reasoning and C programming concepts like data types, operators, functions, loops etc. The output provided for code snippets tests understanding of variable scope, precedence of operators, return values of functions and control flow.

Uploaded by

fresherschoice
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 12

1) When he P: Q: R: S: did not know he was nervous and heard the hue and cry at midnight what to do

The Proper sequence should be: A.RQPS C.SQPR Ans..A 2) Then P: Q: R: S: it struck me of course suitable it was how eminently B.QSPR D.PQRS

The Proper sequence should be: A.SPQR C.PSRQ Ans.C 3) I read an advertisement that said P: Q: R: S: posh, air-conditioned gentleman of taste are available for fully furnished rooms B.QSRP D.QPSR

The Proper sequence should be: A.PQRS C.PSQR Ans.B Some proverbs/idioms are given below together with their meanings. Choose the correct meaning of proverb/idiom 4) To keeps one's temper A.To become hungry C.To preserve ones energy E.None of these Ans.B 5) To have an axe to grind A.A private end to serve C.To have no result E.None of these Ans.A 6) To cry wolf A.To listen eagerly C.To turn pale E.None of these Ans.B Read the each sentence to find out whether there is any grammatical error in it. The error, if any will be in one part of the sentence. 7) (solve as per the direction given above) A.We discussed about the problem so thoroughly B.on the eve of the examination B.To give false alarm D.To keep off starvation B.To fail to arouse interest D.To work for both sides B.To be in good mood D.To be aloof from B.PSRQ D.SRPQ

C.that I found it very easy to work it out. D.No error. Ans.A 8) (solve as per the direction given above) A.I could not put up in a hotel B.because the boarding and lodging charges C.were exorbitant D.No error. Ans.A Each question consist of two words which have a certain relationship to each other followed by four pairs of related words, Select the pair which has the same relationship. 9) GRAIN:SALT A.shard:pottery C.blades:grass Ans.D 10) THRUST:SPEAR A.mangle:iron C.bow:arrow Ans.D 11) LIGHT:BLIND A.speech:dumb C.tongue:sound Ans.A 12) WAN:COLOUR A.corpulent:weight C.pallid:complexion B.insipid:flavour D.enigmatic:puzzle B.language:deaf D.voice:vibration B.scabbard:sword D.fence:epee B.shred:wood D.chip:glass

Ans.B In questions given below, a part of the sentence is italicised and underlined. Below are given alternatives to the italicised part which may improve the sentence. Choose the correct alternative 13) The workers are hell bent at getting what is due to them. A.hell bent on getting C.hell bent upon getting Ans.C 14) If the room had been brighter, I would have been able to read for a while before bed time. A.If the room was brighter C.Had the room been brighter Ans.C 15) his powerful desire brought about his downfall. A.His intense desire B.His desire for power C.His fatal desire Ans.B Find the correctly spelt words. 16) (solve as per the direction given above) A.Ommineous C.Ominous Ans.C 17) A. C. Ans.C 18) (solve as per the direction given above) A. Scripher B. Scripture (solve as per the direction given above) Benefitted Benefited B. D. Benifited Benefeted B.Omineous D.Omenous D.No improvement B.If the room are brighter D.No improvement B.hell bent for getting D.No improvement

C. Ans.B

Skripture

D.

Scriptur

In the following questions choose the word which is the exact OPPOSITE of the given words 19) NADIR A.Modernity C.Liberty Ans.B 20) EXTRAVAGANCE A.Luxury C.Economical Ans.C 21) OBSCURE A.Implicit C.Explicit Ans.C 22) URBANE A.Illiterate C.Discourteous Ans.C In the following the questions choose the word which best expresses the meaning of the given word. 23) CORPULENT A.Lean B.Gaunt B.Backward D.Orthodox B.Obnoxious D.Pedantic B.Poverty D.Cheapness B.Zenith D.Progress

C.Emaciated D.Obese Ans.D 24) VENT

A.Opening C.End Ans.A 25) CANNY A.Obstinate C.Clever Ans.C Technical 26. )#include main() { int a=6,y=3,z; float t=4.55;

B.Stodge D.Past tense of go

B.Handsome D.Stout

z=a/y+t+a/y-t+a-2*t; printf("%d",z); } a. 3 c. 3.55 Ans: D 27.Which of the following statements are correct ? 1: 2: 3: 4: A. A string is a collection of characters terminated by '\0'. The format specifier %s is used to print a string. The length of the string can be obtained by strlen(). The pointer CANNOT work on string. A, B B. A, B, C b. 3.00000 d.none

C. Ans-B

B, D

D.

C, D

28. which is used for storing pictures or graphics a) mbr b)mar c)frame buffer d)sdram 29.What is the similarity between a structure, union and enumeration? A. B. C. D. Ans-B 30.What will be the output of the program ? #include<stdio.h> int main() { enum days {MON=-1, TUE, WED=6, THU, FRI, SAT}; printf("%d, %d, %d, %d, %d, %d\n", MON, TUE, WED, THU, FRI, SAT); return 0; } A. -1, 0, 1, 2, 3, 4 C. -1, 0, 6, 2, 3, 4 Ans-D 31. Pick the odd man out. a)GPRS b)GSM c)SIM d)IDM Ans.D 32.In which stage the following code B. -1, 2, 6, 3, 4, 5 D. -1, 0, 6, 7, 8, 9 All of them let you define new values All of them let you define new data types All of them let you define new pointers All of them let you define new structures

#include<stdio.h> gets replaced by the contents of the file stdio.h A. C. Ans-D 33.Point out the error in the program ).#include #define int printf("#int(intv)"); main() { int x; float g; g=int x printf("-------------"); } Ans: compier error 34. Main () { Static char a[3][4]={"abcd","mnop" ,"fghi"} Putchar(**a); } a)will not compile successfully b)prints a c)prints m d)prints garbage Ans: b 35.What is the difference between #include <file> and #include ?file?? 36. Given the following statement During editing During execution B. During linking D. During preprocessing

enum day = {jan = 1, feb=4, april, may} What is the value of may? (a) 4 (b) 5 (c) 6 (d) 11 (e) None of the above 37. Find the output for the following C program main {int x,j,k; j=k=6;x=2; x=j*k; printf("%d", x); 38. Find the output for the following C program fn f(x) { if(x<=0) return; else f(x-1)+x; } 39. Find the output for the following C program i=20,k=0; for(j=1;j<i;j=1+4*(i/j)) {k+=j<10?4:3; } printf("%d", k);

40. Find the output for the following C program int i =10 main() {int i =20,n; for(n=0;n<=i;) {int i=10; i++; } printf("%d", i); 41. Find the output for the following C program int x=5; y= x&y 42. Find the output for the following C program Y=10; if( Y++>9 && Y++!=10 && Y++>10) {printf("%d", Y); else printf("%d", Y); } 43. Find the output for the following C program f=(x>y)?x:y a) f points to max of x and y b) f points to min of x and y c)error 44. What is the sizeof(long int)

(a) 4 bytes (b) 2 bytes (c) compiler dependent (d) 8 bytes 45. Which of the function operator cannot be over loaded (a) <= (b) ?: (c) == (d) * 46. Find the output for the following C program main() {int x=2,y=6,z=6; x=y==z; printf(%d",x) 47.main(){ float fl = 10.5; double dbl = 10.5 if(fl ==dbl) printf(UNITED WE STAND); else printf(DIVIDE AND RULE) } what is the output? a)compilation error b)UNITED WE STAND c)DIVIDE AND RULE d)linkage error. 48.main()

{ static int ivar = 5; printf(%d,ivar--); if(ivar) main(); } what is the output? a)1 2 3 4 5 b) 5 4 3 2 1 c)5 d)compiler error:main cannot be recursive function. 49.main() { extern int iExtern; iExtern = 20; printf(%d,iExtern); } what is the output? a)2 b) 20 c)compile error d)linker error 50..#define clrscr() 100 main(){ clrscr(); printf(%d\n\t, clrscr()); } what is the output? a)100 b)10 c)compiler errord)linkage error

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy