<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Topics tagged with text]]></title><description><![CDATA[A list of topics that have been tagged with text]]></description><link>https://community.secnto.com//tags/text</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 23:51:40 GMT</lastBuildDate><atom:link href="https://community.secnto.com//tags/text.rss" rel="self" type="application/rss+xml"/><pubDate>Invalid Date</pubDate><ttl>60</ttl><item><title><![CDATA[CS602 Assignment 2 Solution and Discussion]]></title><description><![CDATA[Solution:
Program:-
#include&lt;stdio.h&gt;
#include&lt;graphics.h&gt;
#include&lt;conio.h&gt;
#include&lt;stdlib.h&gt;
int main()
{
 	int gd,gm,n,*x,i,k=0;
	//window coordinates int wx1=220,wy1=140,wx2=420,wy2=140,wx3=420,wy3=340,wx4=220,wy4=340;
	int w[]={220,140,420,140,420,340,220,340,220,140};//array for drawing window
	detectgraph(&amp;gd,&amp;gm); 
	initgraph(&amp;gd,&amp;gm,"c:\\turboc3\\bgi"); //initializing graphics
	printf("Window:-");
	setcolor(RED); //red colored window
	drawpoly(5,w); //window drawn
	printf("Enter the no. of vertices of polygon: ");
	scanf("%d",&amp;n);
	x = malloc(n*2+1);
	printf("Enter the coordinates of points:\n");
	k=0;
	for(i=0;i&lt;n*2;i+=2) //reading vertices of polygon
	{
		printf("(x%d,y%d): ",k,k);
		scanf("%d,%d",&amp;x[i],&amp;x[i+1]);
		k++;
	}
	x[n*2]=x[0]; //assigning the coordinates of first vertex to last additional vertex for drawpoly method.
	x[n*2+1]=x[1];
	setcolor(WHITE);
	drawpoly(n+1,x);
	printf("\nPress a button to clip a polygon..");
	getch();
 	setcolor(RED);
 	drawpoly(5,w);
 	setfillstyle(SOLID_FILL,BLACK);
 	floodfill(2,2,RED);
 	gotoxy(1,1); //bringing cursor at starting position
 	printf("\nThis is the clipped polygon..");
 	getch();

 	cleardevice();
 	closegraph();
 	return 0;
}


]]></description><link>https://community.secnto.com//topic/2180/cs602-assignment-2-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/2180/cs602-assignment-2-solution-and-discussion</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>