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...


How can draw a box in cprogram without using graphics.h
header file & using only one printf(); ?

Answers were Sorted based on User's Feedback



How can draw a box in cprogram without using graphics.h header file & using only one printf();..

Answer / chandan kumar r

#include<stdioh>
#include<conio.h>
void main()
{
printf("______________\n|______________|\n");
getch();
}

output:
____________________
|____________________|

Is This Answer Correct ?    37 Yes 9 No

How can draw a box in cprogram without using graphics.h header file & using only one printf();..

Answer / c.p.senthil

Generic Box routine,
to draw with prescribed length and width

// function defintion
void drawBox(int length, int width)
{
int i, j;

for(i=0; i<length; i++)
printf("_");
printf("\n");

for(j=0; j<width-1; j++)
{
printf("|");
for(i=0; i<(length-2); i++)
printf(" ");
printf("|");
printf("\n");
}

printf("|");
for(i=0; i<length-2; i++)
printf("_");
printf("|");
}

// function call
drawBox(30, 5);

Is This Answer Correct ?    1 Yes 1 No

How can draw a box in cprogram without using graphics.h header file & using only one printf();..

Answer / jai

this is foolish question

Is This Answer Correct ?    0 Yes 2 No

How can draw a box in cprogram without using graphics.h header file & using only one printf();..

Answer / veeramalliga

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("\n----------------\n");
printf("\n| |\n");
printf("\n| |\n");
printf("\n-----------------\n");
getch();
}

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More C Interview Questions

What is character set?

0 Answers  


how many keywords are available in 'c' language a) 32 b) 34 c) 45 d) 48

1 Answers  


which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

0 Answers  


why TCS selected more student in the software field from all institution.

5 Answers   TCS,


Can we change the value of #define in c?

0 Answers  


What is 1d array in c?

0 Answers  


What is self-referential structure in c programming?

0 Answers  


Explain what is the difference between far and near ?

0 Answers  


What is && in c programming?

0 Answers  


I came across some code that puts a (void) cast before each call to printf. Why?

0 Answers  


Write a program to show the change in position of a cursor using c

0 Answers  


int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above

0 Answers  


Categories