textwidth
December 24, 2011
/*
Write a program in C for textwidth
*/
#include<graphics.h>
#include<conio.h>
main()
{
int gd = DETECT, gm, width;
char array[100];
initgraph(&gd, &gm, "C:\\TC\\BG I");
width = textwidth("C programming");
sprintf(array,"Textwidth = %d",width);
outtext(array);
getch();
closegraph();
return 0;
}
0 Comments