Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Topic :: Programs





Programs Interview Questions
Questions Answers Views Company eMail

1. Write a program to reverse every second word in a given sentence.

1 5963

what is the abstract class,interface ,its difference with a programatic eg.? hi,recently i went for an interview they ask me what is abstract class ,interface and its difference I said abstract class contain abstact method ,abstract method is a method with no body.Abstract class cannot be instantiated.Abstract class is a base class it required derived class for the implementation of method. Interface is a syntactical contract that all derived class should follow it define properties ,method,events which are known as member of interface. Then They asked me what is the difference between them. I said abstract class interface 1.abstact class can implement method 1.interface cant 2.abstact class can contain constructor, 2.interface cant destructor 3.abstract class cannot support multiple 3.interface support inheritance etc Then they said some different answer I said dont no. Then they ask me when i should make abstract class for an project and when i should make interface. I said if suppose there is two class which must be having method with different logic then we sholud make abstract class. and if suppose we have two class having method .with different logic then we can make interface . Am i correct with my explaination.if not correct me .please provide me that when should we create abstract class and interface and what is difference .please help me

1 4678

why we calld java object orinted programming language??

TCS,

1908

how to identify the pseudo conversation by seeing the program

DELL,

2 7868

why use Description programming? what is advantages and disadvantage of this methods?

2 4167

how will u pass dadta to cobol+db2 program...?

IBM,

4 9900

CAN U SAY WHICH PROGRAMING LANGUAGE IS USED BY DOCTORS....?

1 4332

write a c program to find largest number in matrix(in each row,each column, diagonally, and in the whole matrix)? Its urgent.

2 26679

Which Programer/Programing Software Should i use to program Mitsubishi FX Series PLC. PLZ DO ANSWER

1845

Write a program for print infinite numbers

Wipro,

3 11394

DB2 application programs can be written in which of the following languages? a) COBOL b) PL/I, FORTRAN, PASCAL, COBOL, C c) PL/I, FORTRAN, C, COBOL, ASSEMBLER d) COBOL, PL/I, FORTRAN, BASIC, APL2, C & ASSEMBLER

2 4485

3. Program to print all possible substrings. ex: String S St Str Stri Strin String t tr tri trin tring r

Huawei,

3 25818

Programming in C JayLQue@hotmail.com 1. Which of the types listed below can be the type of the result value returned by a user-defined function? A) int B) double C) char D) all of the above E) none of the above 2. What is the output from this program? #include void do_something(int *thisp, int that) { int the_other; the_other = 5; that = 2 + the_other; *thisp = the_other * that; } int main(void) { int first, second; first = 1; second = 2; do_something(&second, first); printf("%4d%4d\n", first, second); return 0; } A) 35 2 B) 1 35 C) 35 7 D) 1 2 E) 0 3. In function apart defined below, how many of the parameters are considered input parameters? void apart(double x, int *wholep, double *fracp) { *wholep = (int)x; *fracp = x - *wholep; } A) 0 B) 1 C) 2 D) 3 E) all 4. Variables that represent neither problem inputs nor problem outputs but are needed for internal computations are called _____. A) problem constants B) prototypes C) results D) formula variables E) program variables 5. This question concerns the following program fragment: char r, x, y, z, w; scanf("%c%c%c%c", &x, &y, &z, &w); if (x < y) r=x; else r=y; if (r>z) r=z; if (r>w) r=w; printf("%c\n", r); The program's effect can best be described as: A) It displays the letter 'r' after comparing it to x, y, and z. B) Of the four input characters, it displays the one that comes first in the alphabet. C) Of the four input characters, it displays the one that comes last in the alphabet. D) Of the four input characters, it displays the one that comes second in the alphabet. E) It displays nothing since characters cannot be compared. 6. In a function that receives a value from the main function via a parameter and then displays the parameter value on the screen, that parameter is considered __________. A) an input parameter B) an output parameter C) an input/output parameter D) a local variable E) a stub 7. What is the complement of the following expression? n||a <= b && c != 100 A) !n || a > b || c == 100 B) !(n && (a > b || c == 100)) C) !n && (a > b || c == 100) D) !(n || (a > b || c == 100)) E) none of the above 8. The if statement: if (13 < 12) printf("never\n"); else printf("always\n"); A) displays never. B) displays always. C) will not compile since 13 is not less than 12. D) causes a run-time error since 13 is not less than 12. E) displays nothing since 13 is not less that 12. 9. How many lines of output will be displayed by the following program fragment? i=0; do { for (j = 0; j < 4; j = j + 1) printf("%d\n", i + j); i=i + 1; } while (i < 5); A) 0 B) 7 C) 9 D) 16 E) 20 10. For what exact range of values of variable x does the following code segment display the letter 'C'? if (x <= 200) if (x < 100) if (x <= 0) printf("A\n"); else printf("B\n"); else printf("C\n"); else printf("D\n"); A) 0 < x < 100 B) x <= 0 C) 100 <= x <= 200 D) x > 200 E) 100 < x <= 200 11. The effect of the following program segment can best be described as __________. if (x > y) z = x; if (x == y) z=0; if (x < y) z = y; A) the smaller of x and y is stored in z. B) the larger of x and y is stored in z. C) the larger of x and y is stored in z unless x and y are equal, in which case z is assigned zero. D) the larger of x and y is stored in z unless x and y are not equal, in which case z is assigned zero. E) none of the above. 12. The expression: x *= i + j / y; is equivalent to ______. A) x = x * i + j / y; B) x = (x * i) + j / y; C) x = (x * i + j) / y; D) x = x * (i + j / y); E) none of the above 13. The facts that a function assumes to be true of the arguments that it receives are called __________. A) function input validations B) local variables C) postconditions D) preconditions E) none of the above 14. How many times is the loop body of the while statement executed? Refer to the following program segment. Assume that all variables are of type int. z=0; g=0; s=0; i=0; while (i < 50) { scanf("%d", &t); s=s + t; if (t >= 0) g=g + 1; else z=z + 1; i=i + 1; } A) once B) never C) 49 times D) 50 times E) until a number 50 or larger is entered 15. A special value that marks the end of a list of input data is called a __________. A) terminal value B) sentinel value C) loop control value D) input value E) loop termination value 16. Here is the prototype of a function: void five (double x, double* yp, int* zp); Given these variable declarations, which calls to five are valid? int m, n double p, q A) five(m, &p, &n); B) q = five(6.2, &p, &m); C) five(p, &q, &m); D) five(7.1, &p, &q); E) a and c only F) a, b, c, and d 17. The ______ of a function take(s) information into the function from the calling statement. A) local variables B) input arguments C) output arguments D) prototype E) purpose 18. If the input to the program segment below is 85, what is its output? scanf("%d", &s); if (s >= 90) printf ("A\n"); else if (s >= 70) printf ("C\n"); else if (s >= 80) printf ("B\n"); else printf ("D\n"); A) A B) B C) C D) D E) None of the above 19. The value stored in variable s at the end of the execution of the loop could best be described as __________. Refer to the following program segment. Assume that all variables are of type int. z=0; g=0; s=0; i=0; while (i < 50) { scanf("%d", &t); s=s + t; if (t >= 0) g=g + 1; else z=z + 1; i=i + 1; } A) the average of the numbers scanned B) the sum of the numbers scanned C) the largest of the numbers scanned D) how many numbers were scanned E) the sentinel value 20. What is displayed by the C statements that follow if the value input is 2? scanf ("%d", &ctl); switch (ctl) { case 0: case 1: printf("red "); case 2: printf("blue "); case 3: printf("green "); case 4: printf("yellow"); } printf("\n"); A) red B) blue C) green D) yellow E) blue green yellow 21. What is displayed by the C statements below if the value input is 3? scanf ("%d", &n); if (n = 5) printf("Equal\n"); else if (n < 5) printf("Less\n"); else printf("Greater\n"); A) Equal B) Less C) Greater D) No output 22. What will be the value of i after the C statements below have been executed? i=3; j=10; if ((3 * i) < j) i=i + 2; i=i+3; A) 5 B) 6 C) 8 D) 10 E) 15 23. Which of the types listed below can be the type of a function output parameter? A) int* B) double* C) char* D) all of the above E) none of the above 24. Which one of the following lines names a constant needed in a program that computes the price per square inch of a round pizza? A) scanf("%lf", &radius); B) pi = 3.14159; C) #define PI 3.14159 D) #include E) none of the above 25. Which one of these is not the name of a C library function? A) printf B) sqrt C) void D) scanf E) log

Indian Military Services,

3539

Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.

TCS,

2 14018

Let arr be an array of 20 integers. Write a program that first fills the array with up to 20 input values and then finds and displays both the subscript of the largest item in arr and the value of the largest item. • Use an IDE to develop and save your work

2319




Related Topics


Un-Answered Questions { Programs }

How will you make .NET programs work in Linux ?

2016


Discuss your Reward/Recognition programs?

2280


we have 10 concurrent programs under one request group out of 10 ccps all users submitting only 9 programs from srs window remaining one ccp for specific user how can it possible send me answer asap.

2510


What are the key issues that should be addressed in the design, conduct, and evaluation of training programs?

2173


What are the key isssues that should be addressed in the design, conduct, and evaluation of training programs?

2057


What are the key issues that should be addressed in the design, conduct and evaluation of training programs?

2226


I have to write Shells (Linux + Unix)for publishing packages and reports. Is it possible ? What are the differents executable programs ineed to call ?

2166


name poneno dept sun 9894433467 computer This is the xls sheet a programs written to transfer this data into database write test cases and test scenario?

2377


WHAT ARE 19 MODELS OF EDUCATIONAL COUNSELLING? What is the most essentila thing that you consider while formulating any HR policy? In any consulting firm, the time devoted doesn't matter. all that matters is the productivity. What kind of HR and leave policy will you formulate to ensure discipline and time line working along with the increased productivity what is databank in recruitment process why u choose MBA after sicence bacground in graduation what is patent rights and copy rights what is the difference between direct investment and FDI what is the difference between direct investment and FDI what is the difference between patent rights and copy rights what is quality of work life What is KRA and KPI? Wat is recruitment & How is the Recruitment Scenario in todays global market? what is meant by managerial grid why did u select HR as your carrier what is sensex and nifty,what is the difference between those two what is the difference between CEO,MD,PRESIDENT,CHAIRMAN why do u select to do MBA in HR after doing B.Sc in physics? what is the performance management and what are the methods to use in evaluating performance? What is Learning? Please do make a reply to this question: I am bored taking interviews. Please motivate me in taking interview of yours. Trade Unions? what is sensex and nifty,what is the difference between those two What are Incentives? What is Fringe Benefits? What is Employee Morale? what are your positives and negatives as a HR? What is the best way to develop pay systems that are understandable, workable, and acceptable to employees at all levels? What is Coordination? What is the Difference between salary and wage? what is ur great weekness what is the importance of hr in the life of business? What is wages? What are the key issues that should be addressed in the design, conduct, and evaluation of training programs? where u see yourself after 10 years As jobs become more team-oriented, assessment centers will be used more often for non-management jobs. Do you agree or disagree? What is HRD? What did you like in your previous job? What is Fringe Benefits? What are the latest employee evalution trends? What is the Difference between salary and wage? why do u select to do MBA in HR after doing B.Sc in physics? What is HCN?s? what is the importance of hr in the life of business? How much do you think we should pay you?Do you know how much other companies are paying? What is the best way to develop pay systems that are understandable, Workable, and acceptable to employees at all levels? Difference between Training and Development? What is Different between Recruitment and Selection What is "mutual gains negotiation"? Selection means? Trade Unions? what is 360 degree performance appraisal? what is meant by an organisation,explain me differently What is On the Job Training? Management Guru,Professor Lallus Rail , a book was written by? What is Workers Compensation? why should i select you? Roles and Responsibilities of a HR ? How much do you think we should pay you?Do you know how much other companies are paying? In a room there are 3bulbs, and in the net room there are 3 switches. one can not see through the rooms, then how can you know that which switch is for which bulb with out taking any one's help? Define Motivation? What are the key issues that should be addressed in the design, conduct, and evaluation of training programs? What is "mutual gains negotiation"? what is Persoanl Management? What is HRM? What are Incentives?

7273


The OS is a program that uses various data structures. Like all programs in execution, you can determine the performance and other behavior of the OS by inspecting its state - the values stored in its data structures. In this part of the assignment, we study some aspects of the organization and behavior of a Linux system by observing values of kernel data structures exposed through the /proc virtual file system. The /proc virtual file system: Linux uses the /proc file system to collect information from kernel data structures. The /proc implementation provided with Linux can read many different kernel data structures. If you cd to /proc on a Linux machine, you will see a number of files and directories at that location. Files in this directory subtree each corresponds to some kernel data structure. The subdirectories with numeric names contain virtual files with information about the process whose process ID is the same as the directory name. Files in /proc can be read like ordinary ASCII files. You can open each file and read it using library routines such as fgets() or fscanf(). The proc (5) manual page explains the virtual files and their content available through the /proc file system. Requirements in detail: In this part, you are asked to write a program to report the behavior of the Linux kernel. Your program should run in two different versions. The default version should print the following values on stdout: • Processor type • Kernel version • The amount of memory configured into this computer • Amount of time since the system was last booted A second version of the program should run continuously and print lists of the following dynamic values (each value in the lists is the average over a specified interval): • The percentage of time the processor(s) spend in user mode, system mode, and the percentage of time the processor(s) are idle • The amount and percentage of available (or free) memory • The rate (number of sectors per second) of disk read/write in the system • The rate (number per second) of context switches in the kernel • The rate (number per second) of process creations in the system If your program (compiled executable) is called proc_parse, running it without any parameter should print out information required for the first version. Running it with two parameters "proc_parse " should print out information required for the second version. read_rate represents the time interval between two consecutive reads on the /proc file system. printout_rate indicates the time interval over which the average values should be calculated. Both read_rate and printout_rate are in seconds. For instance, proc_parse 2 60 should read kernel data structures once every two seconds. It should then print out averaged kernel statistics once a minute (average of 30 samples). The second version of your program doesn't need to terminate.

4907


Hey this is venkatesh.Please can any body tell me what is SFLNXTCHG?where we use this keyword?what perpuse we use this?Can you tell me in real time senario with example? And in 7 specification(RPG/400)what is the mandatory specification using programs?

2117


What is the technical flow associated with P2P or Procure to Pay cycle like the tables, APIs, concurrent programs involved in this cycle. Only technical please.

3932


How to draw the flowchart for structure programs?

9336


As per interoperatbility programs written in one language can be used by other language. How can we restrict the features of one language (say C#) in the programmer written in another language (say VB)..for example we have some features like operator overloading which is possible C#.NET (not in VB.NET), how can we restrict that when we are using this code in VB.NET.

1947


What if you are not accepted in the schools you are applying for? ifyou didn't get into any programs?

2182