Implementation of Bresenhams circle drawing algorithm

#include #include #include #include void main() { int r,x,y,p,xc=320,yc=240; int gd=DETECT,gm; initgraph(&gd,&gm,”C:\\TC\\BGI”); cleardevice(); printf(“Enter the radius “); scanf(“%d”,&r); putpixel(xc,yc,YELLOW); x=0; y=r; putpixel(xc+x,yc-y,1); p=3-(2*r); for(x=0;x<=y;x++) { if (p<0) { y=y; p=(p+(4*x)+6); } else { y=y-1; p=p+((4*(x-y)+10)); } putpixel(xc+x,yc-y,1); putpixel(xc-x,yc-y,2); putpixel(xc+x,yc+y,3); putpixel(xc-x,yc+y,4); putpixel(xc+y,yc-x,5); putpixel(xc-y,yc-x,6); putpixel(xc+y,yc+x,7); putpixel(xc-y,yc+x,8); } getch(); closegraph(); }

MySql Update Table

To update records in a table we use update quey Syntax:

First select the table data

by this query we get a table ‘student’ which we have created in our database as shown above. To update the above table, we use the query:

we can see the updated table

If you … Read more

MySql Select Query

To select all records from a table we use following query Syntax

To select all row of student we use

It will show following result

To select perticular column from table we use

If we want to select id and name of student the we will write

ther is no … Read more

MySql Select Database

Suppose you have created database, to use it , write query: Syntax

If we want to select ebhor database then use following query

with the help of this query you can work on your created database.

MySql Create New Database

To create database use following query: Syntax

To create a database with name ebhor use following query

This query will create a new database.

MySql Show all databases

To see all the created  databases we use show database query Syntax

Example

It will show all the databases created in mysql.

First Program Hello Everyone!

All c statemtns are written inside main() it is the starting point of execution. To represent start and ent of main() we use curly breces{}. To display text in output window we use printf() Example

Result