Pages

Thursday 11 September 2014

Software Engineering BY Roger S. Pressman

Click Here to Download


Software Engineering By Pankaj Jalote

Click Here to Download


Friday 8 August 2014

Operating System Concepts, 7th Editon - Silberschatz, Galvin, Gagne


ClICK HERE to Download

Let Us C eBook

This book covers these three aspects of C programming and doesn’t assume any programming background. It begins with the basics and steadily builds the pace, so the reader finds it easy to handle more complicated topics later. This popular author has crafted hundreds of excellent programming examples and exercises for every aspect of C programming.

CLICK HERE to Download

Wednesday 23 July 2014

Internet Download Manager


Download - Click Here

Monday 21 July 2014

Write a program to generate a following numbers triangle.

(Where user entered number through keyboard, for example if num=5)

                            54321
                            4321
                            321
                            21
                            1

Ans.
/*c program for number triangle pyramid*/

#include<stdio.h>
#include<conio.h>
int main()
{
 int num,c;
 printf("Enter loop repeat number(rows): ");
 scanf("%d",&num);
 for(; num>=1; num--)
 {
  for(c=num; c>=1; c--)
     printf("%d",c);
  printf("\n");
 }
 getch();
 return 0;
} 

/*************OUTPUT****************
Enter loop repeat number(rows): 5

                            54321
                            4321
                            321
                            21
                            1

************************************/

Write a program to generate a following numbers triangle:

(Where user entered number through keyboard, for example if num=5).
      




1



12


123

1234
12345

Ans.
/*c program for number triangle pyramid*/

#include<stdio.h>
#include<conio.h>
int main()
{
 int num,r,c,sp;
 printf("Enter loop repeat number(rows): ");
 scanf("%d",&num);
 for(r=1; num>=r; r++)
 {
  for(sp=num-r; sp>=1; sp--)
     printf(" ");
  for(c=1; c<=r; c++)
     printf("%d",c);
  printf("\n");
 }
 getch();
 return 0;


/*************OUTPUT****************
Enter loop repeat number(rows): 5





1



12


123

1234
12345

************************************/

Write a program to generate a following numbers triangle:

Where user entered number through keyboard, for example if num=5)

                                12345
                                1234
                                123
                                12
                                1

Ans.
/*c program for number triangle pyramid*/
#include<stdio.h>

#include<conio.h>
int main()
{
 int num,c;
 printf("Enter loop repeat number(rows): ");
 scanf("%d",&num);
 for(; num>=1; num--)
 {
  for(c=1; c<=num; c++)
     printf("%d",c);
  printf("\n");
 }
 return 0;


/*************OUTPUT****************
Enter loop repeat number(rows): 5

                                12345
                                1234
                                123
                                12
                                1

*********************************/

Write a program to generate a following numbers triangle:

(Where user entered number through keyboard, for example if num=5)

                        1
                        12
                        123
                        1234
                        12345

Ans.

/* c program for number triangle*/
#include<stdio.h>
//#include<conio.h>
int main()
{
 int num,r,c;
 printf("Enter loop repeat number(rows): ");
 scanf("%d",&num);
 for(r=1; r<=num; r++)
 {
  for(c=1; c<=r; c++)
     printf("%d",c);
  printf("\n");
 }
 //getch();
 return 0;


/*************OUTPUT**************
Enter loop repeat number(rows): 5

                        1
                        12
                        123
                        1234
                        12345

***********************************/

Write a program to generate a following numbers structure:

(Where user entered number through keyboard, for example if num=5)
                            11111
                            22222
                            33333
                            44444
                            55555

Ans.


#include<stdio.h>
int main()
{
 int num,r,c;
 printf("Enter loop repeat number(rows): ");
 scanf("%d",&num);
 for(r=1; num>=r; r++)
 {
  for(c=num; c>=1; c--)
     printf("%d",r);
  printf("\n");
 }
 return 0;
}

/*************OUTPUT****************
Enter loop repeat number(rows): 5

                            11111
                            22222
                            33333
                            44444
                            55555

************************************/

Write a program to generate a following numbers structure:

(Where user entered number through keyboard, for example if num=5)
                            55555
                            44444
                            33333
                            22222
                            11111

Ans.

/* c program for number structure*/
#include<stdio.h>
#include<conio.h>
int main()
{
 int num,r,c;
 printf("Enter loop repeat number(rows): "); 
 scanf("%d",&num);
 for(r=num; r>=1; r--)
 {
  for(c=num; c>=1; c--)
     printf("%d",r);
  printf("\n");
 }
 getch();
 return 0;
}
/*************OUTPUT**************
Enter loop repeat number(rows): 5

                            55555
                            44444
                            33333
                            22222
                            11111

***********************************/              

Write a program to generate a following numbers structure:

(Where user entered number through keyboard, for example if num=5)

                                54321
                                54321
                                54321
                                54321
                                54321
Ans.

/* c program for symbol triangle*/
#include<stdio.h>
#include<conio.h>
int main()
{
 int num,r,c;
 printf("Enter loop repeat number(rows): ");
 scanf("%d",&num);
 for(r=1; num>=r; r++)
 {
  for(c=5; c>=1; c--)
     printf("%d",c);
  printf("\n");
 }
 getch();
 return 0;
}
/*************OUTPUT**************
Enter loop repeat number(rows): 5

                                54321
                                54321
                                54321
                                54321
                                54321

***********************************/

Write a program to generate a following numbers structure:

Where user entered number through keyboard, for example if num=5)

                        12345
                        12345
                        12345
                        12345
                        12345

Ans.

/* c program for number rectangle*/
#include<stdio.h>
#include<conio.h>
int main()
{
 int num,r,c;
 printf("Enter loop repeat number(rows): ");
 scanf("%d",&num);
 for(r=1; num>=r; r++)
 {
  for(c=1; c<=num; c++)
   printf("%d",c);
  printf("\n");
 }
 getch();
 return 0;
}

/*************OUTPUT**************
Enter loop repeat number(rows): 5

                        12345
                        12345
                        12345
                        12345
                        12345

***********************************/

Write a program to generate a following @'s triangle?

               




@



@@


@@@

@@@@
@@@@@

Ans.
/* c program for symbol triangle*/
#include<stdio.h>
#include<conio.h>
int main()
{
 int num,r,c,sp;
 printf("Enter loop repeat number(rows): "); 
 scanf("%d",&num);
 for(r=1; num>=r; r++)
 {
  for(sp=num-r; sp>=1; sp--)
     printf(" ");
  for(c=1; c<=r; c++)
     printf("@");
  printf("\n");
 }
 getch();
 return 0;

/*************OUTPUT**************
Enter loop repeat number(rows): 5





@



@@


@@@

@@@@
@@@@@

***********************************/

Write a program to generate a following #'s triangle?

#



##


###

####
#####

Ans.

/* c program for symbol triangle*/
#include<stdio.h>
#include<conio.h>
int main()
{
 int num,r,c;
 printf("Enter loop repeat number(rows): ");
 scanf("%d",&num);
 for(r=1; num>=r; r++)
 {
  for(c=1; c<=r; c++)
     printf("#");
  printf("\n");
 }
 getch();
 return 0;


/*************OUTPUT**************
Enter loop repeat number(rows): 5

#



##


###

####
#####

***********************************/

Write a program to generate a following @'s triangle?

@@@@@
@@@@
@@@

@@


@

/* c program for symbol triangle*/
#include<stdio.h>
#include<conio.h>
int main()
{
 int num,c;
 printf("Enter loop repeat number(rows): ");
 scanf("%d",&num);
 for(; num>=1; num--)
 {
  for(c=1; c<=num; c++)
     printf("@");
  printf("\n");
 }
 getch();
 return 0;


/*************OUTPUT**************
Enter loop repeat number(rows): 5

@@@@@
@@@@
@@@

@@


@

***********************************/

Write a program to generate a following #'s triangle?

#####

####


###



##




#

Ans.

/* c program for symbol triangle*/
#include<stdio.h>
#include<conio.h>
int main()
{
 int num,r=1,c,sp;
 printf("Enter loop repeat number(rows): "); 
 scanf("%d",&num);
 for(; num>=1; num--,r++)
 {
  for(sp=r; sp>1; sp--)
     printf(" ");
  for(c=1; c<=num; c++)
    printf("#");
  printf("\n");
 }
 getch();
 return 0;


/*************OUTPUT**************
Enter loop repeat number(rows): 5
#####
 #### 
  ###
   ##
    #
***********************************/

Write a program to generate a following structure?

@@@@@
@@@@@
@@@@@
@@@@@
@@@@@ 
                    
Ans.   

/* c program for symbol structure*/
#include<stdio.h>
#include<conio.h>
int main()
{
 int num,r,c;
 printf("Enter loop repeat number(rows): ");
 scanf("%d",&num);
 for(r=1; num>=r; r++)
 {
  for(c=1; c<=num; c++)
     printf("@");
  printf("\n");
 }
 getch();
 return 0;
}

/************* OUTPUT **************
Enter loop repeat number(rows): 5

                @@@@@
                @@@@@
                @@@@@
                @@@@@
                @@@@@
***********************************/