Skip to main content

Posts

Showing posts from January, 2012

Infosys Placement Paper Infosys 2010 with Answers & Solutions.

Here are the details of Infosys Placement Paper I job in Infosys Here you will find Infosys Placement Paper Pattern and Download questions of Infosys Placement Paper 2010 with Answers & Solutions. Infosys Placement Paper Pattern 2010:- 1) arithmetic and reasoning skills : 30 questions -----40 mins 2) verbal English grammar & comprehension) : 40 questions -----30 mins Infosys Placement Paper 2010:- Arithmetic:- 1. There is a merry-go-round race going on.One person says,"1/3 of those in front of me and 3/4 of those behind me, give the total number of children in the race". Then the number of children took part in the race? (repeated from previous papers) Ans: 13 [ Assume there are x participants in the race.In a round race,no: of participants in front of a person wil be x-1 an that behind him wil b x-1. i.e, 1/3(x-1) + 3/4(x-1) = x ; solving x = 13 ] 2. In an Island the natives lie and visitors speak truth. A man wants to know whether a salesman

PHP Part 2: PHP Installation

What do you Need? If your server supports PHP you don't need to do anything. Just create some .php files in your web directory, and the server will parse them for you. Because it is free, most web hosts offer PHP support. However, if your server does not support PHP, you must install PHP. Here is a link to a good tutorial from PHP.net on how to install PHP5: http://www.php.net/manual/en/install.php Download PHP Download PHP for free here: http://www.php.net/downloads.php Download MySQL Database Download MySQL for free here: http://www.mysql.com/downloads/ Download Apache Server Download Apache for free here: http://httpd.apache.org/download.cgi

Lesson 3: Using Loops In C programming

Loops are used to repeat a block of code. Being able to have your program repeatedly execute a block of code is one of the most basic but useful tasks in programming -- many programs or websites that produce extremely complex output (such as a message board) are really only executing a single task many times. (They may be executing a small number of tasks, but in principle, to produce a list of messages only requires repeating the operation of reading in some data and displaying it.) Now, think about what this means: a loop lets you write a very simple statement to produce a significantly greater result simply by repetition. One caveat: before going further, you should understand the concept of C's true and false, because it will be necessary when working with loops (the conditions are the same as with if statements). This concept is covered in the Previous Tutorial . There are three types of loops: for, while, and do..while. Each of them has their specific uses. They are

Break and Continue Kyewords (Importance and How to use)

Two keywords that are very important to looping are break and continue. The break command will exit the most immediately surrounding loop regardless of what the conditions of the loop are. Break is useful if we want to exit a loop under special circumstances. For example, let's say the program we're working on is a two-person checkers game. The basic structure of the program might look like this: while (true) { take_turn(player1); take_turn(player2); } This will make the game alternate between having player 1 and player 2 take turns. The only problem with this logic is that there's no way to exit the game; the loop will run forever! Let's try something like this instead: while(true) { if (someone_has_won() || someone_wants_to_quit() == TRUE) {break;} take_turn(player1); if (someone_has_won() || someone_wants_to_quit() == TRUE) {break;} take_turn(player2); } This code accomplishes what we want--the primary loop of the game wil

Do-While Loop inc C Programming (syntax and Example)

DO..WHILE - DO..WHILE loops are useful for things that want to loop at least once. The structure is   do  {   } while ( condition ); Notice that the condition is tested at the end of the block instead of the beginning, so the block will be executed at least once. If the condition is true, we jump back to the beginning of the block and execute it again. A do..while loop is almost the same as a while loop except that the loop body is guaranteed to execute at least once. A while loop says "Loop while the condition is true, and execute this block of code", a do..while loop says "Execute this block of code, and then continue to loop while the condition is true". Example: #include <stdio.h> int main() { int x; x = 0; do  { /* "Hello, world!" is printed at least one time even though the condition is false */ printf( "Hello, world!\n" ); } while ( x != 0 ); getchar(); }   Keep in mind that you must include a t

Using For Loop in C Programming Syntax and Simple Program

FOR - for loops are the most useful type. The syntax for a for loop is for ( variable initialization; condition; variable update )  { Code to execute while the condition is true } The variable initialization allows you to either declare a variable and give it a value or give a value to an already existing variable. Second, the condition tells the program that while the conditional expression is true the loop should continue to repeat itself. The variable update section is the easiest way for a for loop to handle changing of the variable. It is possible to do things like x++, x = x + 10, or even x = random ( 5 ), and if you really wanted to, you could call other functions that do nothing to the variable but still have a useful effect on the code. Notice that a semicolon separates each of these sections, that is important. Also note that every single one of the sections may be empty, though the semicolons still have to be there. If the condition is empty, it is evaluated as true and

Different characteristics of Capability Maturity Model (CMM)

Capability maturity model or CMM as it is often abbreviated. It is a development model developed after a prolonged study of the data collected from various organizations from all over the world. Characteristics of Capability Maturity Model 1.The development of this model was funded by the USDD (United States department of defence). 2.The capability maturity model became the foundation for the development of software engineering institute or SEI as it is popularly known as. 3.The term “maturity” emphasises process optimization and level of formality. 4.Processes are optimized from ad-hoc practices to steps that have been formally defined. 5.Nowadays this model is being used effectively for management of result metrics. 6.Capability maturity model has proved to be great help in active optimization of the processes. 7.This model allows improvement in the development processes of an organization. 8.It is an effective and good approach towards improvement of any organizatio

While Loop in C Programming (Syntax and Example)

WHILE - WHILE loops are very simple. The basic structure is while ( condition )  {  Code to execute while the condition is true  } The true represents a boolean expression which could be x == 1 or while ( x != 7 ) (x does not equal 7). It can be any combination of boolean statements that are legal. Even, (while x ==5 || v == 7) which says execute the code while x equals five or while v equals 7. Notice that a while loop is like a stripped-down version of a for loop-- it has no initialization or update section. However, an empty condition is not legal for a while loop as it is with a for loop. Example: #include <stdio.h> int main() { int x = 0; /* Don't forget to declare variables */ while ( x < 10 )  { /* While x is less than 10 */ printf( "%d\n", x ); x++; /* Update x so the condition can be met eventually */ } getchar(); }   This was another simple example, but it is longer than the above FOR loop. The easiest

Basic Syntax of IF - ELSE Statement in C , C++ with example

Basic If Syntax The structure of an if statement is as follows: if ( statement is TRUE ) Execute this line of code Here is a simple example that shows the syntax: if ( 5 < 10 ) printf( "Five is now less than ten, that's a big surprise" ); Here, we're just evaluating the statement, "is five less than ten", to see if it is true or not; with any luck, it's not! If you want, you can write your own full program including stdio.h and put this in the main function and run it to test. To have more than one statement execute after an if statement that evaluates to true, use braces, like we did with the body of the main function. Anything inside braces is called a compound statement, or a block. When using if statements, the code that depends on the if statement is called the "body" of the if statement. For example: if ( TRUE ) { /* between the braces is the body of the if statement */ Execute all statements inside the body }

Lesson 2: Using If statements in C, C++

Basic Syntax of IF - ELSE Statement in C , C++ with example  The ability to control the flow of your program, letting it make decisions on what code to execute, is valuable to the programmer. The if statement allows you to control if a program enters a section of code or not based on whether a given condition is true or false. One of the important functions of the if statement is that it allows the program to select an action based upon the user's input. For example, by using an if statement to check a user-entered password, your program can decide whether a user is allowed access to the program. Without a conditional statement such as the if statement, programs would run almost the exact same way every time, always following the same sequence of function calls. If statements allow the flow of the program to be changed, which leads to more interesting code. Before discussing the actual structure of the if statement, let us examine the meaning of TRUE and FALSE in computer ter

What is the difference between scripted testing and exploratory testing?

Though exploratory testing and scripted are considered being a part of each other, there is a lot of difference between the two. The scripted testing is performed by a set of test scripts which can be defined as a set of instructions that are to be performed on the software system or application under the test to test a particular functionality as required.  There are following ways of executing test scripts: 1. Automated testing: - It can be easily repeated and is faster than manual testing. - It is very useful when it is required to run the same tests over and over again. - It is performed as a part of regression testing. - Automated tests are poorly written and they may break during the execution. - They only test what has been programmed into them. - They only ensure that old bugs do not reappear. - Manual testing and automated testing should be mixed together and used for exploratory testing. 2. Manual testing: - This is the oldest and the most rigorous form

What kind of Applications You Can Write with C#

The .NET Framework has no restrictions on the types of applications that are possible, as discussed earlier. C# uses the framework and therefore has no restrictions on possible applications. However, here are a few of the more common application types: Windows applications. Applications, such as Microsoft Office, that have a familiar Windows look and feel about them. This is made simple by using the Windows Forms module of the .NET Framework, which is a library of controls (such as buttons, toolbars, menus, and so on) that you can use to build a Windows user interface (UI). Alternatively, you can use Windows Presentation Foundation (WPF) to build Windows applications, which gives you much greater flexibility and power. Web applications. Web pages such as those that might be viewed through any Web browser. The .NET Framework includes a powerful system for generating Web content dynamically, enabling personalization, security, and much more. This system is called ASP.NET (Ac

.net(dotNet) Framework Platform Architecture

.Net Framework Platform Architecture : C# programs run on the .NET Framework, an integral component of Windows that includes a virtual execution system called the common language runtime (CLR) and a unified set of class libraries. The CLR is the commercial implementation by Microsoft of the common language infrastructure (CLI), an international standard that is the basis for creating execution and development environments in which languages and libraries work together seamlessly. Source code written in C# is compiled into an intermediate language (IL) that conforms to the CLI specification. The IL code and resources, such as bitmaps and strings, are stored on disk in an executable file called an assembly, typically with an extension of .exe or .dll. An assembly contains a manifest that provides information about the assembly's types, version, culture, and security requirements. When the C# program is executed, the assembly is loaded into the CLR, which might take

Introduction to the C# Language

C# is an elegant and type-safe object-oriented language that enables developers to build a variety of secure and robust applications that run on the .NET Framework. You can use C# to create traditional Windows client applications, XML Web services, distributed components, client-server applications, database applications, and much, much more. Visual C# 2010 provides an advanced code editor, convenient user interface designers, integrated debugger, and many other tools to make it easier to develop applications based on version 4.0 of the C# language and version 4.0 of the .NET Framework. C# Language:          C# syntax is highly expressive, yet it is also simple and easy to learn. The curly-brace syntax of C# will be instantly recognizable to anyone familiar with C, C++ or Java. Developers who know any of these languages are typically able to begin to work productively in C# within a very short time. C# syntax simplifies many of the complexities of C++ and provides pow

How to write Resume ? Tips

Words are the name of the game when it comes to resumes, and job seekers need to be strategic in their choice of them. Many of us often use keywords on our resumes, but how do you know which words to choose and which ones to leave out? In answer to those questions, we’ve compiled a brief list of some of the most overused words on resumes. Avoid them whenever possible and choose a more creative alternatives. After knowing which words to avoid, you’ll be ready to construct an eye-catching resume. 1. Accomplished. Yes, we all know every job seeker is accomplished, otherwise you would have been fired from every job you’d ever had if you never accomplished anything. Instead try: peak performer. 2. Results-Driven. Everyone’s professional resume starts out with “Results-driven (insert your job title here)”. The only problem is, in the job-search game you don’t want to sound like everyone else; you want to stand out from the crowd. Instead try: performance-driven. 3. Successful. This is

Hashing line segments C Program Code

Below the information to understand the program completely. Input: R = a rectangular region with bottom-left corner at (0,0) and top-right corner at (X,Y), X and Y being user-specified. n = Number of line segments whose endpoints have integer coordinates and lie in R. Task:   Use hashing to store the line segments one by one in a suitable data structure T. While generating, the two endpoints of each segment should be randomly selected and a newly generated segment should be inserted in T only if it is not already there in T. #include<stdio.h> #include<stdlib.h> #include<math.h> #include<malloc.h> typedef struct nodetype { int x1; int x2; int y1; int y2; struct nodetype *next; }node; node* lastnode(node *); int findduplicate(node **,int,int,int,int,int); void display(node **,int); main() { int X,Y,x1,y1,x2,y2,n,i=0,j,c,exist,s=1; node  **A=NULL,*ptr=NULL,*last=NULL; printf(“******************************************************

Tips For GATE 2012

Gate 2012 exam will be held in February  second Sunday. So all the GATE aspirants  now should be serious about study . Every one has first priority to go a good IIT (Indian Institute of Technology ) for M Tech. Many students across the India and aboard the India preparing seriously and working hard to crack IIT. Many of iit aspirants taking coaching at good coaching centers in India. Now the time to achieve your aim. As a IITian I am suggesting you some tips which will help you achieve your goal. Before 15 days of exam: Make a strict schedule to complete your revision study. Don’t read any new topic if you face difficulties in understanding because gate is fully objective and all four options in a question will appear nearly same but there are little difference among them . If you don’t have deep knowledge in any topic then you cant understand the questions or options correctly.It is not subjective questions where if you answer the question and some part is correct then y

Searching using system calls Program in C Code

Write a C program that takes a file name as a command line parameter and sorts a set of integers stored in the file (use any sorting method). You can assume that the file will always be there in the current directory and that it will always contain a set of integers(maximum no. of integers is 1000). The sorted output is written to the display and the input file is left unchanged. Compile the C file into an executable named “sort1″. Now write a C program that implements a command called “sort” that you will invoke from the shell prompt. The syntax of the command is “sort “. When you type the command, the command opens a new xterm window, and then sorts the integers stored in the file using the program “sort1″. Look up the man pages for xterm, fork and the different variations of exec* calls (such as execv, execve, execlp etc.) to do this assignment. #include<stdio.h> int main(int argc, char *argv[]) { FILE *fp1; int A[1000],T[1000]; int j,i=0; /* check that

Algorithm Design PPT PDF SLIDES

Algorithm Design PDF SLIDES Author: Kevin Wayne Text Book: Algorithm Design by Jon Kleinberg and Éva Tardos. Download slides here: TOPICS READING Stable matching 1 Algorithm analysis 2 Graphs 3 Greedy algorithms 4.1 - 4.4 Minimum spanning tree 4.5 - 4.7 Huffman codes † 4.8 Divide-and-conquer 5.1 - 5.4 Multiplication 5.5 - 5.6 Dynamic programming 6.1 - 6.7 Bellman-Ford 6.8 - 6.10 Max flow, min cut 7.1 - 7.3 Network flow applications 7.5 - 7.12 Assignment problem 7.13 Intractability 8.1 - 8.2 Poly-time reductions 8.5 - 8.8, 8.10 NP-completeness 8.3 - 8.4, 8.9 PSPACE 9 Extending limits of tractability 10 Approximation algorithms 11 Local search 12 Randomized algorithms 13