Explained C Aptitude Interview Questions Series-3

Here are Third batch of frequently asked C aptitude questions & these questions have proper answers given so mnc team suggest you should go over these Apptitude questions before your job interview


If u haven`t read C aptitude questions#1 & #2 in this excellent series then please do so before continuing


Q How can I implement a variable field width with printf? That is, instead of %8d, I want the width to be specified at run time.


A: printf("%*d", width, x) will do just what you want.


Q How can I print numbers with commas separating the thousands? What about currency formatted numbers?


A: The functions in begin to provide some support for these operations, but there is no standard routine for doing either task. (The only thing printf() does in response to a custom locale setting is to change its decimal-point character.)


Q What is wrong with this code?


char c;


while((c = getchar()) != EOF) ...


A: For one thing, the variable to hold getchar's return value must be an int. getchar() can return all possible character values, as well as EOF. By squeezing getchar's return value into a char, either a normal character might be misinterpreted as EOF, or the EOF might be altered (particularly if type char is unsigned) & so never seen.


Q Why does the code


while(!feof(infp)) {


fgets(buf, MAXLINE, infp);


fputs(buf, outfp);


}


copy the last line twice?


A: In C, end-of-file is only indicated *after* an input routine has tried to read, & failed. (In other words, C's I/O is not like Pascal's.) Usually, you should just check the return value of the input routine (in this case, fgets() will return NULL on end- of-file); often, you don't need to use feof() at all.


Q My program's prompts & intermediate output don't always show up on the screen, especially when I pipe the output through another program.


A: It's best to use an explicit fflush(stdout) whenever output should definitely be visible (& especially if the text does not end with \n). a lot of mechanisms attempt to perform the fflush() for you, at the "right time," but they tend to apply only when stdout is an interactive terminal.


Q How can I print a '%' character in a printf format string? I tried \%, but it didn't work.


A: Simply double the percent sign: %% .


\% can't work, because the backslash \ is the *compiler's* escape character, while here our problem is that the % is essentially printf's escape character.


Q Someone told me it was wrong to use %lf with printf(). How can printf() use %f for type double, if scanf() requires %lf?


A: It's true that printf's %f specifier works with both float & double arguments. Due to the "default argument promotions" (which apply in variable-length argument lists such as printf's, whether or not prototypes are in scope), values of type float are promoted to double, & printf() therefore sees only doubles. (printf() does accept %Lf, for long double.)


Q What printf format should I use for a typedef like size_t when I don't know whether it's long or some other type?


A: Use a cast to convert the value to a known, conservatively- sized type, then use the printf format matching that type. For example, to print the size of a type, you might use


printf("%lu", (unsigned long)sizeof(thetype));


Q Why doesn't the call scanf("%d", i) work?


A: The arguments you pass to scanf() must always be pointers. To fix the fragment above, change it to scanf("%d", &i) .


+Some Great DBMS aptitude Questions


+Exhaustive collection of Operating System Concepts


+All the C apptitude questions You want

Remember a lotta these questions with detailed explanation can be found At this Website


READ ANSWER and EXPLANATION

21 Easy Ibm aptitude placement Questions for 2020


Ibm aptitude placement paper



1. In 1978, a kg of paper was sold at Rs25/-.If the paper rate increases at 1.5% more than the inflation rate which is 6.5% a year, then what wil be the cost of a kg of paper after 2 years?

(a) 29.12

(b) 29.72

(c) 30.12

(d) 32.65

(e) none of these



2. If a car starts from A towards B with some velocity.Due to some problem in the engine after travelling 30km, the car goes with 4/5 th of its actual velocity.The car reaches B 45 min later to the actual time.If the car engine fails ofter travelling 45km, the car reaches the destination B 36 min late to the actual time.What is the initial velocity of car & what is the distance between A & B in km

Ans. 20 & 130.

3. In A,B,C are having some marbles with each of them. A has given B & C the same number of marbles each of them already have.Then, B gave C & A the same number of marbles they already have.Then C gave A & B the same number of marbles they already have.At the end A,B,& C have equal number of marbles.

(i) If x,y,z are the marbles initially with A,B,C respectively.

Then the number of marbles B have at the end

(a) 2(x-y-z)

(b) 4(x-y-z)

(c) 2(3y-x-z)

(d) x + y-z

Ans. (c)



(ii) If the total number of marbles are 72, then the number of marbles with A at the starting

(a) 20

(b) 30

(c) 32

(d) 39

Ans. (d)



4. A person has Rs 100/- in his pocket, he can as 25 pencils or 15 books.He kept 15% of the money for travelling expenses & purchased 5 pencils.So how many books he can purchase with the remaining money.

5. 10 Questions on analogies.

eg: chief : tribe :: governer : state

epaulette : shoulder :: tiara : head

guttural : throat :: gastric : stomach

inept : clever :: languid : active

knife : butcher ::

hammer : carpenter ::



6. The values of shares (in Rs).of A, B & C from January to June are as follows.

Month


A


B


C

January


30


60


80

February


35


65


85

March


45


75


65

April


40


75


82

May


55


75


85

June


50


75


80

i) During this period which share has undergone maximium fluctuation?

ii) In which month it is possible to buy B & C selling A?

iii) In which month the share values are very low?

iv) By purchasing one share of A & 4 each of B & C in the beginning of the period, when should these be sold to get maximum profit?



7. In a computer institute 9 languages can be taught.The module is of 6 months duration & of the six languages only one can be taught each month.In addition to that BASIC is always taught & should be in first month itself.

WORD PERFECT is to be taught in the preceeding week of WORD STAR.

FORTRAN can not be taught until COBAL is taught prior to that.

BINO, FIFO can never be taught in single module.

Languages are BASIC, WORD STAR, WORD PERFECT, FORTRAN, COBAL, BINO, FIFO, LOTUS, C.

i) If word star is in 3rd month , what could be in 6th month.

ii) If COBAL is in the 2nd month & BINO in 6th month. FORTRAN will be taught in which month.



8. In a class, except 18 all are above 50 years.15 are below 50 years of age. How many people are there?

(a) 30

(b) 33

(c) 36

(d) none of these.

Ans. (d)



9. A square plate of some size is cut at four corners. Equal squares of the same size are cut & is formed as open box.If this open box carries 128 ml of oil. What is the size of the side of the plate?

(a) 17

(b) 14

(c) 13

(d) None of these



10. In a square, all the mid points are joined. The inner square is shaded.

If the area of the square is A, what is the area of the shaded area?

11. Two questions on basic angles i.e given a circle, a few chords or diameter is drawn etc.



12. If the follwoing statements are given

@(a,b)= (a+b)/2

/(a,b)= a/b

*(a,b)= ab

If a=1, b=2 then find

i) /(a,(@(a,b),*(a,b)))

ii) */(a,@(*(a,b)))

16. In UNIX a files i-node ......?

Ans. Is a data structure that defines all specifications of a file like the file size, number of lines to a file, permissions etc.



17. The UNIX shell ....

a) does not come with the rest of the system

b) forms the interface between the user & the kernal

c) does not give any scope for programming

d) deos not allow calling one program from with in another

e) all of the above

Ans. (b)



18. enum number { a=-1, b= 4,c,d,e}

What is the value of e ?

(a) 7

(b) 4

(c) 5

(d) 15

(e) 3



19. The very first process created by the kernal that runs till the kernal process is halts is

a) init

b) getty

c) both (a) & (b)

d) none of these

Ans. (a)



20. Output of the following program is

main()

{int i=0;

for(i=0;i<20;i++)

{switch(i)

case 0:i+=5;

case 1:i+=2;

case 5:i+=5;

default i+=4;

break;}

printf("%d,",i);

}

}

a) 0,5,9,13,17

b) 5,9,13,17

c) 12,17,22

d) 16,21

e) Syntax error

Ans. (d)



21. What is the ouptut in the following program?

main()

{char c=-64;

int i=-32

unsigned int u =-16;

if(c>i)

{printf("pass1,");

if(c

printf("pass2");

else

printf("Fail2");

}

else

printf("Fail1);

if(i

printf("pass2");

else

printf("Fail2")

}

a) Pass1,Pass2

b) Pass1,Fail2

c) Fail1,Pass2

d) Fail1,Fail2

e) None of these

Ans. (c)

Remember a lotta these questions with detailed explanation can be found At this Website


READ ANSWER and EXPLANATION

MOST ASKED TECHNICAL QUESTIONS FOR IBM (part 1 of 5)

MOST ASKED TECHNICAL QUESTIONS FOR IBM PART 1

1 Draw a flowchart to find a number from an array.

2. What is vector processing Subscribe
A vector processor, or array processor, is a CPU design that is able to run mathematical operations on a large number of data elements very quickly. This is in contrast to a scalar processor which handles one element at a time – the vast majority of CPUs are scalar (or close to it)

3. Best sorting if elements are already sorted Subscribe
insertion sort is the best sort when the list is already sorted as the no of comparision reduces its complexity is n.quick sort is best when the pivot variable is in the middle of the list

4. Insertion sortSoftware configuration management

5.x-=y+1 is equivalent to..
x=x-y-1 because it is interpreted as x=x-(y+1)

6. What happens when we open a file in r+ mode Subscribe
- 'r+' opens the file for both reading and writing.
- 'r' should be used when the file will only be read.

7. If you get error in adapter which device will u use?

8. If you type in the command nohup sort employees > list 2 > error out & and log off ,the next tim
If you type in the command nohup sort employees > list 2 > error out & and log off ,the next time you log in . the output will be
a). in a file called list and the error will de typed in a file error out
b). there will be no file called list or error out
c). error will be logged in a file called list and o/p will be in error out
d). you will not be allowed to log in
e).none of the above
ans nohup is a Unix command that is used to run another command while suppressing the action of the HUP (hangup) signal, enabling the command to keep running after the user who issues the command has logged out. It is most often used to run commands in background as daemons. Output that would normally go to the terminal goes to a file called nohup.out if it has not already been redirected.
ans (a) chk it

9. In UNIX, What is files i-node
It is a data structure that defines all specifications of a file like the file size ,number of lines to a file ,permissions etc.


10. The UNIX shell is....
a).does not come with the rest of the system
b).forms the interface between the user and kernel
c) does not give any scope for programming
d) does not allow calling one program from with in another
e) all of the above
ans b

11 The command

grep first second third /usr/you/myfile

a) prints lines containing the words first, second or third from the file /usr/you/myfile

b) searches for lines containing the pattern first in the files

second, third, and /usr/you/myfile and prints them

c) searches the files /usr/you/myfiel and third for lines containing

the words first or second and prints them

d) replaces the word first with the word second in the files third and /usr/you/myfile

e) None of the above

Ans) b

Q)class xx{
int getseg();
private:
int segDet;
};
this class may create problem because: reasons are..

ans becoa getseg class is private.

Q)What is fork()?
ans fork() is a function that is used to create a child process from a parent process.


Q)What are the files in /etc directory?.
ans configuration files.
Example: /etc/lilo.conf, /etc/fstab , /etc/mtab , /etc/resolve.conf , /etc/profile, /etc/host.conf etc.

Q) What does the following statement mean?
int (*a)[4]

A. 'a' is a pointer to an array of 4 integers
B. 'a' is an array of pointers to integer
C. 'a' is a pointer to function returning an intege

Q)Which is not is not overloaded?
ans The only C operators that can't be are . and ?: (and sizeof, which is technically an operator). C++ adds a few of its own operators, most of which can be overloaded except :: and .*.


12 The redirection operators > and >>

a) do the same function

b) differ : > overwrites, while >> appends

c) differ : > is used for input while >> is used for output

d) differ : > write to any file while >> write only to standard output

e) None of these

Ans) b

Q)read abt all these topicssss
1 What is the difference between OOP (Object Oriented Programming) and POP (Procedure Oriented Programming).
2 Example of Polymorphism.
3 Why paging, segmentation needed.
4 What is ADT (Abstract Data Type)?


Q)ARP is used for...........
A. map from MAC address to IP add.
B. map from IP addresses to MAC add.
C. to store the IP addresses.
ans b

Q) Which of the following API is used to hide a window

a) ShowWindow

b) EnableWindow

c) MoveWindow

d) SetWindowPlacement

e)None of the above

ans a

Q) what is pragma exception???
ans Associating a PL/SQL Exception with a Number: Pragma EXCEPTION_INIT
To handle error conditions (typically ORA- messages) that have no predefined name, you must use the OTHERS handler or the pragma EXCEPTION_INIT. A pragma is a compiler directive that is processed at compile time, not at run time.In PL/SQL, the pragma EXCEPTION_INIT tells the compiler to associate an exception name with an Oracle error number. That lets you refer to any internal exception by name and to write a specific handler for it. When you see an error stack, or sequence of error messages, the one on top is the one that you can trap and handle.You code the pragma EXCEPTION_INIT in the declarative part of a PL/SQL block, subprogram, or package using the syntaxPRAGMA EXCEPTION_INIT(exception_name, -Oracle_error_number);where exception_name is the name of a previously declared exception and the number is a negative value corresponding to an ORA- error number. The pragma must appear somewhere after the exception declaration in the same declarative section, as shown in the following example:

DECLARE
deadlock_detected EXCEPTION;
PRAGMA EXCEPTION_INIT(deadlock_detected, -60);
BEGIN
... -- Some operation that causes an ORA-00060 error
EXCEPTION
WHEN deadlock_detected THEN
-- handle the error
END;

Q)Function entry for DLL in win3.1
ans WinMain

Q)What type of memory could be accessed in least time?
ans CPU registers. The top of the memory pyramid :)

Q)what is data integrity constants?
ans Oracle uses integrity constraints to prevent invalid data entry into the database. It can be achieved using NOTNULL, Primary Key ,CHECK, Foreign Key etc..... constraints

Q)Paging is ------------------------
ans Paging is the technique of accessing memory ,larger than the maximum memory which can be addressed by a microprocessor.The interfaced memory is divided into pages such that the size of each page is equal to or less then the maximum memory which can be interfaced. Then whenever a specific address is to be accessed, the corresponding page is selected and the memory location is accessed.

Q) What is trigger in DBMS?
ans A Trigger is a PL/SQL block that executes whenever a particular event takes place.events in database like Insert,Update, Delete and combination of these three will cause the trigger to execute.Trigger is a technique to maintain integrity constraints

Q)What is the difference b/w 0123 and 123 in c?

ans 0123 the number that can be start 0 it will be treated as a octal number that is base 8. 123 is the integer number representation base is 10.

Q) Nice command is used for?
ANS This is used for change the priority

13 Which of the choices is true for the mentioned declaration ?

const char *p;

and

char * const p;

a) You can't change the character in both

b) First : You can't change the characterr &

Second : You can;t change the pointer

c) You can't change the pointer in both

d) First : You can't change the pointer &

Second : You can't chanage the character

e) None

Ans) b ( check it)

14) The standard source for standard input , standard output and standard error is

a) the terminal

b) /dev/null

c) /usr/you/input, /usr/you/output/, /usr/you/error respectively

d) NOne

Ans) a

Q The very first process created by the kernal that runs

till the kernal process is haltes is

a)init

b)getty

c)

d)

e)none

(Ans is a)



15)which function is the entry point for a DLL in MS Windows 3.1

a) main

b) Winmain

c) Dllmain

d) Libmain

e) None

Ans) b

16)which of the following function is used to repaint a window immediately

a) Sendmessage(hWnd,WM_PAINt,......)

b) InvalidateRect(.......)

c) MoveWindow

d) WM_COPY

e) None
ans e

17What will be result of the following program?

void myalloc(char *x, int n)

{

x= (char *)malloc(n*sizeof(char));

memset(x,\0,n*sizeof(char));

}

main()

{

char *g="String";

myalloc(g,20);

strcpy(g,"Oldstring");

printf("The string is %s",g);

}

a) The string is : String

b) Run time error/Core dump

c) The string is : Oldstring

d) Syntax error during compilation

e) None of these

Ans) c ( check it )


READ ANSWER and EXPLANATION

MOST ASKED TECHNICAL QUESTIONS FOR IBM (part 4 of 5)

TECHNICAL QUESTION FOR IBM PART 4

( if u haven`t read )here is>>> PART 1
>>> PART 2
>>> PART 3


19)In the following code segment what will be the result of the function,

value of x , value of y



{

unsigned int x=-1;

int y;

y = ~0;

if(x == y)

printf("same");

else

printf("not same");

}



a) same, MAXINT, -1

b) not same, MAXINT, -MAXINT

c) same , MAXUNIT, -1

d) same, MAXUNIT, MAXUNIT

e) not same, MAXINT, MAXUNIT

Ans) a

20)what will the following program do?

void main()

{

int i;

char a[]="String";

char *p="New Sring";

char *Temp;

Temp=a;

a=malloc(strlen(p) + 1);

strcpy(a,p); //Line no:9//

p = malloc(strlen(Temp) + 1);

strcpy(p,Temp);

printf("(%s, %s)",a,p);

free(p);

free(a);

} //Line no 15//



a) Swap contents of p & a and print:(New string, string)

b) Generate compilation error in line number 8

c) Generate compilation error in line number 5

d) Generate compilation error in line number 7

e) Generate compilation error in line number 1

Ans) b

Q What is the result

main()

{

char c=-64;

int i=-32

unsigned int u =-16;

if(c>i){

printf("pass1,");


READ ANSWER and EXPLANATION

Latest 2008 IBM Test Pattern Explained with questions

Updated for 2026
The current version of this guide — verified for 2026 placement season — is on PapersAdda. Read the latest →
IBM Test Pattern Detailed

Pattern :

The test consists of three rounds as of all of us know Written , Technical & HR interviews for job .

The written paper contains 55 Qns to be answered in 1hr.

It contains the Qns on verbal ability,Aptitude,reasoning, Attention details & technical.

The verbal ability includes the following Qns.

I got ___________ in traffic so got late (struck/struckup/hold/……).

Mr Benerjee the officer of …. was questioned ___________(for ,with,on,to) his connection regarding the murder.
The proteins present in ____ apple ,____banana,______Egg are very essential ………..
We have to fill the blanks with a, an or the ( ans: an,a,an)

A Qn was asked on the meaning of underlined word
Here the word is Therapeautic .

Miss X ( some name is given ) given a speech on _____ bank of ____ river kaveri regarding _____________ abilities of the women . like that the Qn goes here also they have given the options like
1 a, an ,the
2 the,the,a
3 a, the,a
4 the, the, the
ans:4

thre is an essay abt the ATM behavior & usage ,security mechanisms ,connectivity, technology used like that .
Qns are asked as follows.
1. how an ATM is connected to net.
2. what the operation not mensioned in the passage
a. with drawl b. deposit c. donations to charities d . amount transaction btnm accounts
3. which of the following is false.

some time s Atm are un reliable.
They are connected through modems.
……
……

3. which is not a possible error regarding ATM.
a. mechanical error b. s/w error .i/p error ……..( the answer depends on the passage & actual errors given)
4. why ATM s are kept in shops
a. because there is no chance of theft there
b. no space in banks.
c. there will be more no of people.

……..
Then csome Qns are on venn diagram models
Like
1 . In a party 10 take only tea 15 take tea & 8 take only coffee then what is the number of persons take either coffee or tea.(nos are not exact).
2. In a college there are students who can play either football or cricket or both.
500 play cricket 220 play both & 600 play football .what is the total strength of the college.

Like this there are one or two more Qns… they r also easy & simple


Then now real IBM pattern starts. It also will be easy but needs a little bit of practice other wise u should have high spontaneous analyzing capacity.

Some 3 Qns are given with instructions like : given three strings check which of them are same ans: A if all are same, B if 1&2 are same, C if 1&3 are same, D if 2&3 are same, E if all are different

Strings are given as
1. a. 66749384879456 b. 6674934879456 c. 6674934879456
2. a. XIVIIMIVIIIVIXIV b.XIIVMIIVXIVIIIV c.XIVIIMIVIIIVIXIV

3. a. 34523897346579 b.343647654869679 c.346548364874379

Three Qns are given in the following model:
1.If + is replaced by *,* is replaced by -,- is replaced by / ,/is replaced by% nad % is replaced by + then what is the value of the following expression.

25-3+32/5%2

Some options will be given u have to choose correct answer. (all the digits are not same)

Next two of the same model but they are giving 4 expressions like above we have to find which one is correct.

Like: a. 35-2+4/3%42=35
b. 25+4-5%6*7=28
…..
……..

Like this they r giving 2 Qns. This seems to be some what risk just increase the speed of calculations .

The remarkable Qn of IBM is on cubes, in this imagination plays major role.

Given a Qn like this: there r three cubes arranged side by side

Each cube is divided into 64 cubes then top most layer of second cube is removed & top two layers of third cube are removed.

& then total volume is painted

1. what is the number of cubes painted on 1 face , 2. two faces, 3. three faces , 4. four faces , 5. no face.

This qn needs more imagination or u have to know the answer well before for this particular qn.

Some Qn s are given on data sufficiency here also analysys plays major role.

There r some 4 or 5 Qns in this model

Like a can do a worked for 5 days & b worked for 7 days how many days they taek to complete the work ………..like that .

There r 3 more qns on relations ship btn numbers , on the solving of eqns.
Then we can have some Qns on technical
One Qn on c, one Qn on UNIX, one on RDBMS , on on processors like that total I had only 6 to 8 Qns

Qns are like this : what is the o/p of printf(“%d”,printf(ram)); ans:ram3
What is the command to kill or stop a process in unix ( kill,stop,terminate ……) . ans : kill (check it out)

Unix is what kind of OS ( multiuser & multitasking).

Like that some what easy Qns we can get.

In this written test I got 42 out of 54( one Qns is not printed well so they asked us to leave it) I saw it when they are pinning my resume to my applcn form & answer sheet.

I got selected for technical interview for job I was called up by Mr. Adithya for the first round of interview for job .


Technical interview for job .

The technical interview for job went on very cool such that we can say it as simple HR .
I got some Qns abt project & languages .

First I entered his cabin by saying excuse me sir .
He responded well invited me by shaking hand & offered the seat.
I said thank u & sat .
The interview for job started like this.
Adithya: have u attended the presentation in the morning?
My self: yes sir.
A: any more qns other than qns asked there?
M: If I got selected into IBM what kind of environment can I expect ( team /individual)
A: ya u can work on various technologies which we train u on . here u have work with the data base of Airtel on behalf of IBM. U can go for any of the technologies depending on the requirement & location preferences…………
M: is there any pre requisites for the job?
A: not needed but u can learn on ur own interest but not necessary.

Then he asked me abt my self.

I have my details as a flowing river which is well practiced followed by hobbies ,strenths & weakness, achievements.

A: what is ur greatest strength i.e c/c++/java/php/oracle like that(he said all the subjects )?
M: I have strong knowledge in C, I know oracle well , I am interested in java also.
He asked what is poly morphism? Afte that what is pointer ?
I answered without any late

A: tell me abt ur project.
I explained the project as I am selling a product to him( with all the benefits by highlighting all the advatages & purpose of project)
By giving the details in the following order:
Project name client name …. Purpose ( simple in one line) back end
After that detailed description of flow was given .
A: what is ur role in ur project?
M : analysis, coding & testing ( analysis,coding,testing mantioned in resume)

A: u have analysed ,designed,coded,& tested the project .
M : ya
A: what the others have done
Here I got a chance to present me as a good maneger & ithink this is one major point I made an impression on him
I answered that as a leader I shared the total wotk among all the members
Ae r 5 people
2 are allotted for only documentation
are allotted for only development I myself designed the data flow & screens & the data base ,how it should be.
Then database was to one guy to develop & one guy taken all the interfaces to develop I developed the server side scripting & I have tested all the coponents individually & integrated & tested again . In this way I participated in all the activities as a leader.
Here he got satisfied with the way I supporting my words.

So what ever u say , be sure that it is supported well .

Then he asked abt achievements.

I said that I have presented a paper .

Then he asked the details abt what did u do & what has been presented in the presentation.
Here also the same confidence was shown & given a brief explanation.

A: any more qns regarding IBM other than the subject / technology.
M: why ibm is considering the women & disabled cases while all others are looking for only talent for their profit .

He answered that qn for 3 minutes explaining abt the talent of woman then the risks of taking woman & how they are handling them & encouraging them.

I said it is very impressive & I like this culture
Then he asked me to wait for some time & hr will be conducted.

Among 27 people 7 were called for hr interview for job

HR
After 1 1/2 hr I was called up to hr as a 5th guy .

It went on very casually.
Just I entered the cabin . I said excuse me. He smiled at me & shook hand & offered the seat . he is very cool I felt very interest in talking with him. He is … some singh.
He started vth a qn how r u dinesh
Ans : fine thanku & asked how r u.
Singh : u r from kadapa ?
A: yes sir
S: there we can get some thing round like pebbles or some thing icant get that name can u bring it for me.
A: is it a bomb?( generally kadapa is welknown for hand made bombs)
S: no
A: mangoes?( we are having a plenty of mango gardens there)
S: no
A: any kind of sweet?
S: no it was a thing which available there only, kadapa is well known for it .
Actually I didn’t get what he want but I decided to show my skills again.
A: ok sir if want I will bring it for u.
S: sure?
A: definitely I will bring it ( stressing the first word as I am having them in my pocket).
S: ok tell me abt ur self
I told the same by hearted essay which contains all my educational details ,hobbies,strenths & weaknesses.

He stressed on weakness i.e. he just given an expression I understood that he wants more regarding that.
Then I have given a brief explanation with example regarding weakness & told how I managed to over come that.

S: what kind of work u r dreaming of ?
A: I should be given a chance to prove my innovation or I should work in an environment where my innovative thoughts can work on behalf of me.wher I can get a significance to my work which worth of a huge amount of money.(here I have given more importance to work satisfaction than money)
S: mr dinesh u r going to be placed for BPO where u have to operate over a s/w which is already developed where u can get very less chances of programming . is it ok for u?
A: yes sir . I want to just launch my self into the s/w company through a company like IBM. No problem I can work here.
S: tell me abt ur family
I told abt my family , as a part of that I mentioned my native place name.

He asked abt that whare it is?
& then
S: how far is it from Hyderabad ?
A: 400 kms( ans delivered instantly without any gap of even a milli second but it is actually 500-600km here the speed is required rather than the facts coz none of us measured the distance personally)
S: whare r u staying?
A : Hostel in SR nagar ( again vth the same speed).
S : can u relocate to B’lore or pune?
A: yes sir
S : sure?
A : definitely I will relocate.
S: if I give a chance to choose among banglore,pune,Chennai & Hyderabad which one u choose.
Here I have taken all the freedom to express my view with out any hesitation
I have given my preferences as per my convenience & also said that if it is neede I can work in any places with out any problem . its just my preference as u asked.

S: ok mr"YOU" thank u pls u can leave & wait out side .

I was unable to understand , for what he called me & with out asking any single tough qn ( I know ibm interviews for job are always tough) he Is sending me out what he is going to judge abt me .

& asked when can I expect the result?
S: just wait for 15 min we will tell u . U had ur lunch?
A: yes sir.
S: then pls go & relax .
I am unable to guess what is going to happen but I felt with confidently that if they choose 4 or 5 I should be one of them.

Gudluck for ur employment and optimization of ur Career

Note: This article is from the original mncplacement archive (2008+). For the 2026-current version with verified offers, salary data, and exam patterns, visit the updated guide on PapersAdda.


READ ANSWER and EXPLANATION

IBM Test paper late 2006 for job employment

Updated for 2026
The current version of this guide — verified for 2026 placement season — is on PapersAdda. Read the latest →

IBM Test paper late 2006



Section 1(Verbal Ability):

Consisted of 10 questions.

5 questions were fill in the blanks. They were quite easy n were mainly based on prepositions

n use of articles



I got _______ in traffic & so got late (stuck / stuck up)



Mr. Banerjee was questioned __________ (for / with / to) his connection regarding the murder

case.



__ Apple, ____ Bananna,___Egg



what is the meaning of therapeutically ?

& more



There was a passage, a technical one (explaining Bank ATM's working), followed by 5 questions

which were easy.



Section 2(Apti):

Consisted of 25 questions.

Some questions were on Venn Diagrams (easy ones)



In a party 10 ate fruits, 15 ate cereals & 8 both. What is the number of people who ate at least one?



In a college students can play cricket or basketball. 500 play cricket. 220 played both & 600 played

basketball. What is the total strength of college?



In a school 10 can play cricket but only 5 can play both cricket & foot ball 8 can play only football .

what is the number of students.

Some were on data sufficiency. They were also quite easy ones.

Question on cube: there is 3 cube of each placed side by side. Each cube is subdivided into 64 parts

each. 16 cubes from the top layer of 2nd cube was taken out & 32 cubes from the top 2 layers of









3rd cube. Then the whole object was painted.

Qs

1)what is the no. of cubes painted in 1 side alone?

2)what is the no.of cubes painted on 3 sides?

3)what is the no. of cubes painted on all 4 sides?

Etc

Some questions were on the following pattern:

In a binary system 1 is written as $ & 0 is written as *. In this system as 1 moves to the left the

value of the number doubles itself. (Clearly this was the problem of binary conversions.

You just needed to put $ n *s in place of 1s n 0s after doing proper conversions).



Questions were how would nos like 65,252 would be written in the given system.(Just convert

them to binary) & what is the LCM of 6,4,8?

Section 3(Attention to detail):

10 questions

Very easy section.

Questions were as to which of the following sets of alphabets, numbers, roman numerals were similar.

They were quite easy to pick out the correct ans

XXXIIV 2.XXXIVI 3.XXXVII

I & II r same

I & II r same

All r same

None r same.

Same model for numbers & alphabets.

Other set of questions were: If + is replaced by *, - is replaced by /, * is replaced by +, / is replaced by

* then calculate 2/65*3+65-23 & so on. (Just hold on patiently & calculate to check which of the

given options is correct)



A set of questions were based as:

There were conditions given as to how a marketing executive would be selected & in the following

questions individuals with their qualifications were given. Based on the previous conditions given u

have to decide whether each one can qualify or not. (Easy set again)

Refer Verbal Reasoning of RS Agarwal









Section 4(Technical Interview):

10 ques

Sum questions on C,database, unix etc

O/p of printf("%d",printf("sum"));



Question on cardinality relationship in a ER diagram(Given)



Question on relationship in Hierarchical database

files can be accessed by_________ (library funs, sys calls, both, none)



Unix is _______(Mutiuser & Multitasking)



Files in Bourne shell can be checked by( test -f, if(file), switch(file)



what is the time complexity of quick sort.



Interview (HR "human resource" & Technical interview ):



Gudluck for ur employment and optimization of ur Career

Note: This article is from the original mncplacement archive (2008+). For the 2026-current version with verified offers, salary data, and exam patterns, visit the updated guide on PapersAdda.


READ ANSWER and EXPLANATION

IBM Interview Test paper early 2007 important questions

Updated for 2026
The current version of this guide — verified for 2026 placement season — is on PapersAdda. Read the latest →

IBM Interview Test paper

Common questions include:

------------------------------------------------------

* Over the next 3-5 years, what sort of role do you see yourself in?

* What are your most significant achievements to date?

* Where do you see your strengths on the technical and personal fronts?

* How could you add value to IBM if you got this job?

* Why would you want to join IBM?

* Could you relate an incident when you were had a difference of opinion with a colleague and tell me how you resolved it?

---------------------------------------------------------------------

4th & 5th feb, 2006 IBM Global Software India Private Ltd. pull campus questions in Saltlake.

Apptitude:

----------------------

No. of Ques. -- 40

Total marks -- 40

Time limit -- 40 minutes

no -ve marks

Female candidates get extra preference, they have lower cut off

---------------------------------------------------------------------

Comprehension -- 5 ques (5 marks)

---------------------------------------------------------------------

Quantitative -- 20 ques (20 marks)

---------------------------------------------------------------------

easiest ques from Agarwal

time & work

hight & dist.

data sufficiency(4)

Prob) is the no a perfect square, if R is integer?

1) R+1 is a square

2) no is divisible by 16

ques on cube(7)

venn prob

if 3 hundred 33 is 333 then 120 hundred 12 is ?

---------------------------------------------------------------------

Technical -- 15 ques (15 marks)

---------------------------------------------------------------------

prob on C, SQL, DBMS, ...(some ques from Test your C skills)

ques are easy but difficult to answer for ECE student.

---------------------------------------------------------------------

some questions had wrong ans, but don't confused.

---------------------------------------------------------------------

Interview

---------------------------------------------------------------------

Technical+HR

duration 10 -- 40 minutes

---------------------------------------------------------------------

common HR ques.

what is linked list?

how many loops are there?

what is the difference bet do loop & do while loop?

how many bits make a byte?

what is binary division?

oop concept

what is polimorphism & inheritance property?

how to define structure?

what is macro & its advantage?

how many bytes take char?

how string is stored in array?

ques on project

some ques on networking: they showed a wire & asked what is this &

specification

write a prog to print -ve to +ve integer/ content of array/

fibonaccy series etc.

Gudluck for ur employment and optimization of ur Career

Note: This article is from the original mncplacement archive (2008+). For the 2026-current version with verified offers, salary data, and exam patterns, visit the updated guide on PapersAdda.


READ ANSWER and EXPLANATION

2007 May IBM Test paper questions Bangalore

Updated for 2026
The current version of this guide — verified for 2026 placement season — is on PapersAdda. Read the latest →
IBM Test paper May 2007 (Bangalore)


Section 1(Verbal Ability):
Consisted of 10 questions.
5 questions were fill in the blanks. They were quite easy n were mainly based on prepositions n use of articles.
1) He was out of work ______ six months before he found a new job. (from/during/for/in).
2)The Chairperson usually presides _____ the meeting. (at/over/during/on).
3) The credibility of the game has been destroyed by the match-fixing scandals in cricket.(choose the word nearest in meaning).
4)They cost $10 _____ kilo(the/a/an).

5)Black Monday was ____ most dramatic in a huge list of horrible days (a/an/the).
Next Reading Passage was given & 5 questions were given based on the passage.
Section 2(Analytical Ability):
Consisted of 25 questions. Duration:30 min.
On a particular day, students who visited a canteen ordered either a burger, a pastry or a sandwich. 19 students had a burger, 25 had a pastry, & 27 had a sandwich. 7 students had a burger & a pastry but not a sandwich, 9 had a pastry & sandwich but not a burger, 5 had a burger & sandwich but not a pastry. 3 students had a burger, a pastry & a sandwich.
How many students had only a burger?
How many students had only a pastry?
How many students had only a sandwich?
Introducing a man, a woman said, "He is the only son of my mother's mother". How is the woman related to the man? (ans: Niece). Some were on data sufficiency. They were also quite easy ones

Some questions were on time & work. For this refer R.S.Agarwal Some questions were on the following pattern:
In a binary system 1 is written as $ & 0 is written as *. In this system as 1 moves to the left the value of the number doubles itself. (Clearly this was the problem of binary conversions. You just needed to put $ n *s in place of 1s n 0s after doing proper conversions).

Section 3(Attention to detail):

10 questions
Very easy section.
questions were: If + is replaced by *, - is replaced by /, * is replaced by +, / is replaced by * then calculate 2/65*3+65-23 & so on. (Just hold on patiently & calculate to check which of the given options is correct)

A set of questions were based as:
There were conditions given as to how a marketing executive would be selected & in the following questions individuals with their qualifications were given. Based on the previous conditions given, u have to decide whether each one can qualify or not. (Easy set again) Refer Verbal Reasoning of RS Agarwal

Section 4(Technical):
10 ques
Sum questions on C, database, unix etc.
· A directed graph is also called _______.
· In a queue the end at which insertions are performed is called the ____ end & the end from where deletions are done is called the ______ end.
· The operator used to get value at address stored in a pointer variable is____.
· char a[]="have a nice day!" ; then p+=7 points to ____
· question about normalization.
· what permission would Chmod 755 yield on a file ?
· The state of the file system is contained in a ____ block.
Remaining questions I don't remember.


Technical Interview for job:
Questions based on C, Database, Unix, DS, CN
what is trigger in DBMS.
what happens when we open a file in r+ mode like whether file will be created if it s not there can we write to file?
which topology takes minimum wiring options: star,bus,ring & complete etc
Ur favourite subject. I chose JAVA.
Oops concepts. They go in detail in the subject.
Also prepare well ur core subjects, Programs.
They ask u everything whatever u mention in ur resume.
HR Interview for job:
They ask u all general questions.
Which websites do you browse frequently n y? N they ask u questions based on it.
What is your latest movie? They ask us to give the gist of the story? What did u like in the movie? Etc..
Questions on ur strengths.

Gudluck for ur employment and furthering ur Career

Note: This article is from the original mncplacement archive (2008+). For the 2026-current version with verified offers, salary data, and exam patterns, visit the updated guide on PapersAdda.


READ ANSWER and EXPLANATION

2008 january IBM Test paper Pattern Chennai

Updated for 2026
The current version of this guide — verified for 2026 placement season — is on PapersAdda. Read the latest →

2008 IBM Test paper Pattern:



1. Written Test for job

English (articles(2), prepositions(3), comprehension passages(5)). Those very easy, no need of preparation


Aptitude (generally they give 10-20 bits but for my exam they gaven only 2) %'s, boats, averages, ages........ they give very easy problems we can calculate with in 1 min.


Reasoning very very important for my exam they given app. 30 above. generally 20 bits. very very very easy topics: directions blood relations ages ven diagrams cubes series general topics....



Technical (C, Unix, DBMS) time management very very important that place u in frist position



2. Technical Interview for job:

what u put in u r resume that sub they mainly concentrate, plz concentrate on preparation of resume..dont copy & paste from others even from net also..plz try to spend more time to prepare resume

common subjects:

C (test u r c skills)

DBMS (any net material or korth or atleast spectrum)

CN ( net material)

UNIX (net material or atleast hitech plz concentrate on commands)

DS ( sorting programs for cse, it is main & all basic operations)



3.HR interview for job

Confidence plays major role in any HR common ques tell me about u family background resume topics my question is tell me about folder not less than 2 min.

dont stop until interviewer stops you.

Gudluck for ur employment and furthering ur Career

Note: This article is from the original mncplacement archive (2008+). For the 2026-current version with verified offers, salary data, and exam patterns, visit the updated guide on PapersAdda.


READ ANSWER and EXPLANATION

LATEST 2008 january IBM placement Questions paper

IBM Test paper1

section 1 : verbal
section 2 : Aptitude
section 3 : Learning Ability

sec 1 consisted of : 2 prepositions
3 meanings
2 articles
5 passage

sec 2 consisted of 2 passages & some q's on arithmetic

one on venn diagrams its easy but options for the questions were given wrong. so don't mess up or panic

other on data interpretation

A, B, C, D, E are managers working in P, Q, R, S companies in Finance, Accounting, Marketing,

Research & Productivity. Some conditions are given such that
-> D works in company P in Finance
-> C neither in Research or Productivity or not even in companies P & S
-> E will not work in companies R & S
& another condition is also given
followed by questions like who will work in comp. R & S, where does E work?...

-> a sentence will be given followed by two options.

ex:

Q) find a>7.5 or not
(i) a>7.4
(ii) a>7.6

a) 1 b)2 c)3 d)4

1-> option (i) is sufficient to find the sol.
2-> option (ii) is sufficient to find the sol.
3-> two are necessary
4-> two are not enough

Q) pq is parallel to RS. if angle PPQ =30 deg. then find angle PRS

Q) some boys & girls together works to finish a work find no. of days it will take
(i) 4 boys & 5 girls
(ii) boy complete a work in6 hours & girls in 8 hours (something like that i don't remember exact ques.)

Q) X Sqr, Y Sqr & Z sqr

-> & some simple arithmetic questions

Q) p said to q that "i met the brother of daughter of my grandmother". then how that person related to p
a) brother b) uncle c) father

Q) In a row of persons D is 7th from left & R is 12 from right. If D & R interchange their places, D would occupy 22nd place from left. find how many boys are there?

a ques. on Profit & Loss

sec 3 consisted of a huge passage followed by 10 questions.

passage on DSL (Digital Subscriber Lines)
Gudluck for ur job Employment


READ ANSWER and EXPLANATION

MOST ASKED TECHNICAL QUESTIONS FOR IBM (part 3 of 5)

TECHNICAL QUESTION FOR IBM PART 3

( if u haven`t read )here is>>> PART 1
>>> PART2

1 Draw a flowchart to find a number from an array.

2. What is vector processing Subscribe
A vector processor, or array processor, is a CPU design that is able to run mathematical operations on a large number of data elements very quickly. This is in contrast to a scalar processor which handles one element at a time – the vast majority of CPUs are scalar (or close to it)

3. Best sorting if elements are already sorted Subscribe
insertion sort is the best sort when the list is already sorted as the no of comparision reduces its complexity is n.quick sort is best when the pivot variable is in the middle of the list

4. Insertion sortSoftware configuration management

5.x-=y+1 is equivalent to..
x=x-y-1 because it is interpreted as x=x-(y+1)

6. What happens when we open a file in r+ mode Subscribe
- 'r+' opens the file for both reading and writing.
- 'r' should be used when the file will only be read.

7. If you get error in adapter which device will u use?

8. If you type in the command nohup sort employees > list 2 > error out & and log off ,the next tim
If you type in the command nohup sort employees > list 2 > error out & and log off ,the next time you log in . the output will be
a). in a file called list and the error will de typed in a file error out
b). there will be no file called list or error out
c). error will be logged in a file called list and o/p will be in error out
d). you will not be allowed to log in
e).none of the above
ans nohup is a Unix command that is used to run another command while suppressing the action of the HUP (hangup) signal, enabling the command to keep running after the user who issues the command has logged out. It is most often used to run commands in background as daemons. Output that would normally go to the terminal goes to a file called nohup.out if it has not already been redirected.
ans (a) chk it

9. In UNIX, What is files i-node
It is a data structure that defines all specifications of a file like the file size ,number of lines to a file ,permissions etc.


10. The UNIX shell is....
a).does not come with the rest of the system
b).forms the interface between the user and kernel
c) does not give any scope for programming
d) does not allow calling one program from with in another
e) all of the above
ans b

11 The command

grep first second third /usr/you/myfile

a) prints lines containing the words first, second or third from the file /usr/you/myfile

b) searches for lines containing the pattern first in the files

second, third, and /usr/you/myfile and prints them

c) searches the files /usr/you/myfiel and third for lines containing

the words first or second and prints them

d) replaces the word first with the word second in the files third and /usr/you/myfile

e) None of the above

Ans) b

Q)class xx{
int getseg();
private:
int segDet;
};
this class may create problem because: reasons are..

ans becoa getseg class is private.

Q)What is fork()?
ans fork() is a function that is used to create a child process from a parent process.


Q)What are the files in /etc directory?.
ans configuration files.
Example: /etc/lilo.conf, /etc/fstab , /etc/mtab , /etc/resolve.conf , /etc/profile, /etc/host.conf etc.

Q) What does the following statement mean?
int (*a)[4]

A. 'a' is a pointer to an array of 4 integers
B. 'a' is an array of pointers to integer
C. 'a' is a pointer to function returning an intege

Q)Which is not is not overloaded?
ans The only C operators that can't be are . and ?: (and sizeof, which is technically an operator). C++ adds a few of its own operators, most of which can be overloaded except :: and .*.


12 The redirection operators > and >>

a) do the same function

b) differ : > overwrites, while >> appends

c) differ : > is used for input while >> is used for output

d) differ : > write to any file while >> write only to standard output

e) None of these

Ans) b

Q)read abt all these topicssss
1 What is the difference between OOP (Object Oriented Programming) and POP (Procedure Oriented Programming).
2 Example of Polymorphism.
3 Why paging, segmentation needed.
4 What is ADT (Abstract Data Type)?


Q)ARP is used for...........
A. map from MAC address to IP add.
B. map from IP addresses to MAC add.
C. to store the IP addresses.
ans b

Q) Which of the following API is used to hide a window

a) ShowWindow

b) EnableWindow

c) MoveWindow

d) SetWindowPlacement

e)None of the above

ans a

Q) what is pragma exception???
ans Associating a PL/SQL Exception with a Number: Pragma EXCEPTION_INIT
To handle error conditions (typically ORA- messages) that have no predefined name, you must use the OTHERS handler or the pragma EXCEPTION_INIT. A pragma is a compiler directive that is processed at compile time, not at run time.In PL/SQL, the pragma EXCEPTION_INIT tells the compiler to associate an exception name with an Oracle error number. That lets you refer to any internal exception by name and to write a specific handler for it. When you see an error stack, or sequence of error messages, the one on top is the one that you can trap and handle.You code the pragma EXCEPTION_INIT in the declarative part of a PL/SQL block, subprogram, or package using the syntaxPRAGMA EXCEPTION_INIT(exception_name, -Oracle_error_number);where exception_name is the name of a previously declared exception and the number is a negative value corresponding to an ORA- error number. The pragma must appear somewhere after the exception declaration in the same declarative section, as shown in the following example:

DECLARE
deadlock_detected EXCEPTION;
PRAGMA EXCEPTION_INIT(deadlock_detected, -60);
BEGIN
... -- Some operation that causes an ORA-00060 error
EXCEPTION
WHEN deadlock_detected THEN
-- handle the error
END;

Q)Function entry for DLL in win3.1
ans WinMain

Q)What type of memory could be accessed in least time?
ans CPU registers. The top of the memory pyramid :)

Q)what is data integrity constants?
ans Oracle uses integrity constraints to prevent invalid data entry into the database. It can be achieved using NOTNULL, Primary Key ,CHECK, Foreign Key etc..... constraints

Q)Paging is ------------------------
ans Paging is the technique of accessing memory ,larger than the maximum memory which can be addressed by a microprocessor.The interfaced memory is divided into pages such that the size of each page is equal to or less then the maximum memory which can be interfaced. Then whenever a specific address is to be accessed, the corresponding page is selected and the memory location is accessed.

Q) What is trigger in DBMS?
ans A Trigger is a PL/SQL block that executes whenever a particular event takes place.events in database like Insert,Update, Delete and combination of these three will cause the trigger to execute.Trigger is a technique to maintain integrity constraints

Q)What is the difference b/w 0123 and 123 in c?

ans 0123 the number that can be start 0 it will be treated as a octal number that is base 8. 123 is the integer number representation base is 10.

Q) Nice command is used for?
ANS This is used for change the priority

13 Which of the choices is true for the mentioned declaration ?

const char *p;

and

char * const p;

a) You can't change the character in both

b) First : You can't change the characterr &

Second : You can;t change the pointer

c) You can't change the pointer in both

d) First : You can't change the pointer &

Second : You can't chanage the character

e) None

Ans) b ( check it)

14) The standard source for standard input , standard output and standard error is

a) the terminal

b) /dev/null

c) /usr/you/input, /usr/you/output/, /usr/you/error respectively

d) NOne

Ans) a

Q The very first process created by the kernal that runs

till the kernal process is haltes is

a)init

b)getty

c)

d)

e)none

(Ans is a)



15)which function is the entry point for a DLL in MS Windows 3.1

a) main

b) Winmain

c) Dllmain

d) Libmain

e) None

Ans) b

16)which of the following function is used to repaint a window immediately

a) Sendmessage(hWnd,WM_PAINt,......)

b) InvalidateRect(.......)

c) MoveWindow

d) WM_COPY

e) None
ans e

17What will be result of the following program?

void myalloc(char *x, int n)

{

x= (char *)malloc(n*sizeof(char));

memset(x,\0,n*sizeof(char));

}

main()

{

char *g="String";

myalloc(g,20);

strcpy(g,"Oldstring");

printf("The string is %s",g);

}

a) The string is : String

b) Run time error/Core dump

c) The string is : Oldstring

d) Syntax error during compilation

e) None of these

Ans) c ( check it )


Q Which of the following API is used to hide a window

a) ShowWindow

b) EnableWindow

c) MoveWindow

d) SetWindowPlacement

e)None of the above

Ans) a

Q enum number { a=-1, b= 4,c,d,e} what is the value of e ?
a)6
b)7
c)8
d)9
ans b

Q PS1 pwd

export PS1 results in

a). your primary prompt being your current directory

b). " " and secondary prompts being the current dir

c). " " prompt being your home dir

d). " " and secondary prompts being the home dir

e). None of the above.
ans a

Q In the process table entry for the kernel process, the process id value is

a) 0
b) 1
c) 2
d) 255
e) it does not have a process table entry

Ans) a

Q + means * and * means / and / means % what is the value of 2+3*5/7
ans 1.2


18)What will be the result of the following program?

main()

{

char p[]="String";

int x=0;



if(p=="String")

{

printf("Pass 1");

if(p[sizeof(p)-2]=='g')

printf("Pass 2");

else

printf("Fail 2");

}

else

{

printf("Fail 1");

if(p[sizeof(p)-2]=='g')

printf("Pass 2");

else

printf("Fail 2");

}

}



a) Pass 1, Pass 2

b) Fail 1, Fail 2

c) Pass 1, Fail 2

d) Fail 1, Pass 2

e) syntax error during compiation


READ ANSWER and EXPLANATION

MOST ASKED TECHNICAL QUESTIONS FOR IBM (part 2 of 5)

PART 2 TECHNICAL QUESTIONS SET

here`s part 1 if u havent read

Q Which of the following API is used to hide a window

a) ShowWindow

b) EnableWindow

c) MoveWindow

d) SetWindowPlacement

e)None of the above

Ans) a

Q enum number { a=-1, b= 4,c,d,e} what is the value of e ?
a)6
b)7
c)8
d)9
ans b

Q PS1 pwd

export PS1 results in

a). your primary prompt being your current directory

b). " " and secondary prompts being the current dir

c). " " prompt being your home dir

d). " " and secondary prompts being the home dir

e). None of the above.
ans a

Q In the process table entry for the kernel process, the process id value is

a) 0
b) 1
c) 2
d) 255
e) it does not have a process table entry

Ans) a

Q + means * and * means / and / means % what is the value of 2+3*5/7
ans 1.2


18)What will be the result of the following program?

main()

{

char p[]="String";

int x=0;



if(p=="String")

{

printf("Pass 1");

if(p[sizeof(p)-2]=='g')

printf("Pass 2");

else

printf("Fail 2");

}

else

{

printf("Fail 1");

if(p[sizeof(p)-2]=='g')

printf("Pass 2");

else

printf("Fail 2");

}

}



a) Pass 1, Pass 2

b) Fail 1, Fail 2

c) Pass 1, Fail 2

d) Fail 1, Pass 2

e) syntax error during compiation


19)In the following code segment what will be the result of the function,

value of x , value of y



{

unsigned int x=-1;

int y;

y = ~0;

if(x == y)

printf("same");

else

printf("not same");

}



a) same, MAXINT, -1

b) not same, MAXINT, -MAXINT

c) same , MAXUNIT, -1

d) same, MAXUNIT, MAXUNIT

e) not same, MAXINT, MAXUNIT

Ans) a

20)what will the following program do?

void main()

{

int i;

char a[]="String";

char *p="New Sring";

char *Temp;

Temp=a;

a=malloc(strlen(p) + 1);

strcpy(a,p); //Line no:9//

p = malloc(strlen(Temp) + 1);

strcpy(p,Temp);

printf("(%s, %s)",a,p);

free(p);

free(a);

} //Line no 15//



a) Swap contents of p & a and print:(New string, string)

b) Generate compilation error in line number 8

c) Generate compilation error in line number 5

d) Generate compilation error in line number 7

e) Generate compilation error in line number 1

Ans) b

Q What is the result

main()

{

char c=-64;

int i=-32

unsigned int u =-16;

if(c>i){

printf("pass1,");

if(c

printf("pass2");

else

printf("Fail2");}

else

printf("Fail1);

if(i

printf("pass2");

else

printf("Fail2")

}

a)Pass1,Pass2

b)Pass1,Fail2

c)Fail1,Pass2

d)Fail1,Fail2

e)none

(Ans is c)

Q Result of the following program is

main()

{

int i=0;

for(i=0;i<20;i++)

{

switch(i)

case 0:i+=5;

case 1:i+=2;

case 5:i+=5;

default i+=4;

break;}

printf("%d,",i);

}

}

a)0,5,9,13,17

b)5,9,13,17

c)12,17,22

d)16,21

e)syntax error

(Ans is d )

Q what will be the result of the following program ?

char *gxxx()

{

static char xxx[1024];

return xxx;

}



main()

{

char *g="string";

strcpy(gxxx(),g);

g = gxxx();

strcpy(g,"oldstring");

printf("The string is : %s",gxxx());

}

a) The string is : string

b) The string is :Oldstring

c) Run time error/Core dump

d) Syntax error during compilation

e) None of these

Ans) b

Q) Result of the following program is

main()

{

int i=0;

for(i=0;i<20;i++)

{

switch(i)

case 0:i+=5;

case 1:i+=2;

case 5:i+=5;

default i+=4;

break;}

printf("%d,",i);

}

}

a)0,5,9,13,17

b)5,9,13,17

c)12,17,22

d)16,21

e)syntax error

ans e or d


READ ANSWER and EXPLANATION
Take Advantage Of 25 of the finest Articles to help u prepare for the Placement Papers and Interview questions
You’d Never Guess How easy it is to get a job after reading these placement preparation articles

Here are 25 Placement Preparation Articles


"IMPORTANT NOTE"
We Update our site frequently and we want to keep you guys informed so enter your email in the top left hand box and click subscribe,so that whenever we post new papers it gets delivered right to your mail.



 

© New Placement papers | Latest Placement Papers