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


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

Answers were Sorted based on User's Feedback



We can draw a box in cprogram by using only one printf();& without using graphic.h header file..

Answer / parmjeet kumar

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

output:

______________
|______________|

Is This Answer Correct ?    16 Yes 9 No

We can draw a box in cprogram by using only one printf();& without using graphic.h header file..

Answer / penchalaiahdinesh

There is another method to print a box without using
graphic.h
using Ascii values

You can see ascii values by running following program..

#include<stdio.h>
#include<conio.h>
main()
{
int i;
clrscr();
for(i=0;i<=255;i++)
printf("%d %c\t",i,i);
getch();
}

The below are the program to print a clear box
#include<stdio.h>
#include<conio.h>
main()
{
int i=218,j,k=1;
clrscr();
printf("%c",i);
x:i=196;
for(j=1;j<=10;j++)
printf("%c",i);
if(k==2)
goto y;
i=191;
printf("%c\n%c %c\n%c",i,179,179,192);
if(k==1)
{k=2;goto x;}
y:printf("%c",217);
getch();
}

Just this and reply me........

Is This Answer Correct ?    5 Yes 0 No

We can draw a box in cprogram by using only one printf();& without using graphic.h header file..

Answer / chandan kumar r

yes the code is currect

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

output:

______________
|______________|

Is This Answer Correct ?    4 Yes 3 No

We can draw a box in cprogram by using only one printf();& without using graphic.h header file..

Answer / mohan reddy

yes the code is currect

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

output:

______________
|______________|

Is This Answer Correct ?    6 Yes 7 No

Post New Answer

More C Interview Questions

main() { printf(5+"good morning"); printf("%c","abcdefgh"[4]); }the o/p is morning and e...how someone explain

1 Answers  


#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }

1 Answers   Vector India,


Give basis knowledge of web designing ...

0 Answers   HCL,


difference between c and c++

3 Answers  


1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if

0 Answers   TCS,


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

0 Answers  


What are external variables in c?

0 Answers  


Can you please explain the scope of static variables?

0 Answers  


Determine the result of performing two successive block transfers into the same area of a frame buffer using the binary arith operations

0 Answers  


prototype of sine function.

2 Answers   Cadence,


pick out the odd one out of the following a.malloc() b.calloc() c.free() d.realloc()

2 Answers   TCS, ZenQ,


What is the meaning of int *x[]();?

1 Answers  


Categories