Thursday, 30 July 2015

WIPRO Solved Placement Questions Papers 2015

 Solved Placement Question Paper 2015

1) Write a Program for the following pattern?
if input = 2
pattern: 

     1*2

     3*4

if input = 5

pattern:

     1*2*3*4*5

     6*7*8*9*10
     11*12*13*14*15
     16*17*18*19*20
     21*22*23*24*25

C Program:

#include< stdio.h >
#include< conio.h >
void main( )
{
           int n, i, p;
           clrscr( );
           printf("\nEnter N Value: ");
           scanf("%d",&n);
           p = n*n;
           for(i = 1; i<=  p; i++)
          {
                  if(i <= p)
                 {
                           printf("%d",i);
                           if((i < p) && (i % n != 0))
                          {
                                   printf("*");
                           }
                 }
                 if(i % n == 0)
                {
                         printf("\n");
                 }
         }
         getch( );
}



2)  What is the output of the following program?

#include< stdio.h >
#include< conio.h >
void main( )
{
         int i = 65;
         printf("%d %o %x",i,i,i);
}

Answer: 65 101 41

3) In breadth-first-search(BFS) search, which of the following option is correct?

Answer: It is begining from node and first all its adjacent nodes are traversed.





Monday, 20 July 2015

Swapping of two numbers using Bit wise Operators in C language



Program:

/* C Program for Swapping of two numbers using Bit wise Operators */
#include < stdio.h >
void main(  )
{
        int a, b;

        a = 10;
        b = 20;
        a = a ^ b;
        b = a ^ b;
        a = b ^ a;
        printf("\n a = %d\t b = %d", a, b);
}

Output:

a = 20    b = 10





Sunday, 5 July 2015

C Programs asked in TCS


Program:

#include<stdio.h>
#include<conio.h>
int main( )
{
       enum status
       {
              pass,fail,dist
        };
        enum status student1, student2, student3;
        student1 = pass;
        student2 = dist;
        student3 = fail;
        printf("%d,%d,%d",student1,student2,student3);
        return 0;
}

Output:


0,2,1



Monday, 18 May 2015

C Program for Conversion of Celsius Temperature to Fahrenheit Temperature

Objective: C Program for Conversion of temperature from Celsius to Fahrenheit

Analysis:

Input : Celsius Temperature

Output : Fahrenheit Temperature

Constraints : F = (C * 9/5)+32

Algorithm:

Step1. Start

Step2. Enter Celsius temperature value

Step3. Read Celsius temperature value

Step4. Fahrenheit Temperature = (C * 9/5)+32

Step5. Display Fahrenheit Temperature

Step6. Stop

Flow Chart:


Fig: Flow Chart for Conversion of Celsius to Fahrenheit


Implementation:

/* Conversion of Temperature from Celsius to Fahrenheit */

#include<stdio.h>
#include<conio.h>
void main( )
{
int c;
float f;
clrscr( ); //Clear Previous Screen Contents
printf("\nEnter Celsius temperature: ");
scanf("%d", &c);
f = (c * 9/5)+32;
printf("\nFahrenheit Temperature is %f",f);
getch( );
}

Compilation & Execution:
In linux:

Step1:

  gcc ctof.c

Step2:

  ./a.out

In Windows(Turbo C)

Step1:

ALT + F9( Compiling )





Step2:

F9( Linking )



Step3:

CTL + F9( Execution )




Output:

Enter Celsius temperature: 32

Fahrenheit Temperature is 93.2000


Source File: CtoF.C




Wednesday, 11 March 2015

C Program for Given Number is AMSTRONG or NOT

Program:
/* C Program to find given number is amstrong or not for N digit number*/
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main( )
{
int temp = 0,n,i = 0,r = 0,m;
long int sum = 0;
printf("Enter N Value:");
scanf("%d",&n);
temp = n;
m = n;
while( temp > 0)
{
                   i++;
                   temp = temp/10;
}
while( n > 0 )
{
r = n%10;
sum = sum + pow(r,i);
n = n/10;
}
if(sum == m)
{
printf("Given Number is AMSTONG");
}
else
{
printf("Given Number is not AMSTRONG");
}
}

Output:


Program3: Basic I/O and Data Types

Program3:

#include<stdio.h>
#include<conio.h>
void main( )
{
int a,b;
printf("Enter a and b Values: ");
scanf("%d%d",&a,&b);
printf("Addition of a and b is %d\n",a+b);
printf("Substraction of a and b is %d\n",a-b);
printf("Multiplication of a and b is %d\n",a*b);
printf("Division of a and b is %d\n",a/b);
printf("Modulus of a and b is %d\n",a%b);
}


Output:


Program1: Basic I/O and Data Types

Program:

#include<stdio.h>
#include<conio.h>
int main( )
{
               clrscr( ); //Clear the Screen Contents
               printf("Welcome\n");
               printf("To\n");
               printf("Let Us Code in C\n");
}


Execution Process in Borland C

Compiling: ALT + F9
Linking:      F9
Execution:   CLT + F9

Output:






Miracle Software Systems Selection Process and Placement Papers 2015



                             Miracle Software Systems is the one of the leading company in India. It is working on various technologies including IBM Tools. For More information visit MiracleSoft Website.

Selection Process:

Round1: 
            
               Verbal Online Test

---> Synonyms and Fill in the Blanks(Vocabulary).

Round2: 

               Aptitude Online Test

---> Problems on trains, Work and Time, Problems on Ages, etc.

Round3: 

               C/JAVA  Online Test

---> All Basic Questions.

Round4: 

               C/JAVA Programming Test

Round5: 

                HR Round









Thanks for Visiting..........