Differences between program mode and immediate mode

Program mode (the "P" on the mode dial of most DSLRs) means that the camera still sets the exposure for you. It chooses the correct aperture and shutter speed for the light available, so your shot is correctly exposed. Program mode also unlocks other functions that give you more creative control over your images... Immediate mode in computer graphics is a major pattern of API(Application Programming Interface) design in graphics libraries, in which the client calls directly cause rendering of graphics objects to the display, or in which the data .

Draw a line using DDA line drawing algorithm


Program: Draw a line using DDA line drawing algorithm
#include<stdio.h>
#include<graphics.h>
#include<conio.h>
#include<math.h>
void ddaline(int x1, int y1, int x2, int y2);
int main()
{
int gd=DETECT,gm,x1,y1,x2,y2;
 initgraph(&gd,&gm,"c:\\tc\\bgi");
int midx=getmaxx()/2, midy=getmaxy()/2;
 setcolor(WHITE);
  line(0,midy,getmaxx(),midy);
   line(midx,0,midx,getmaxy());
    printf(“Enter starting point: “);
     scanf(“%d%d”,&x1,&y1);
printf(“\nEnter ending point: “);
 scanf(“%d%d”,&x2,&y2);
  ddaline(x1,y1,x2,y2);
getch(); closegraph();
 return 0;
}
void ddaline(int x1, int y1, int x2, int y2)
{
int midx=getmaxx()/2, midy=getmaxy()/2;
 int dx=x2-x1, dy=y2-y1;
int pixel;
 if(abs(dx)>abs(dy))
pixel=dx;
else
pixel=dy;
dx=dx/pixel, dy=dy/pixel;
 int i=1, x=x1, y=y1;
  while(i<=pixel)
{
x=x+dx;
 y=y+dy;
putpixel(midx-x, midy+y, getcolor());
 i++
}
}

Output :
Enter Starting Point : 20 30
Enter Ending Point : 100 110




graphics_dda line drawing algorithm_draw dda line drawing algorithm








What is Ledger ?



It is the maid books of the accounting system which is a set of accounts. It contains all accounts relating to the mainly two types one is bounded ledger and another is looseteat ledger.

What is Journal?

journal in finance


It is a book containing a sequential record of transaction. It record all daily transaction of a business into the order in which they occurs. Here transaction are related under the double entry system.

Write down the difference between Cash basis system and Accrual basis system


what is cash basis system and accrual basis system in accounting


Cash : It is a system in which accounting entries are made only when cash is received or paid. Cash basis system means the same as money, which is immediately available. Professional people record there income while any cash  or cheque received, similarly record as expenses when actually cash  or cheque paid both are in a liquid manner.

Accrual : It is a system in which accounting entries are made only the basis of amounts having became due for payment or received. In accrual basis system  the interest or investment is the adding together for different cases over a period of time.

Write down the short note on Trial Balance


trail balance_Trail Balance_what is trail balance?

It is one type of statement (not an account ) which is not mandatory but we prepared it for checking the previous account (journal and Ledger) and before going to the preparation of final account.

Conservatism Convention


According to this convention the accountant follows the following rules  given below –

“Anticipated no profit but provide for all possible losses”, while recording business transaction. Actually an accountant follow a policy that is “Playing Safe”.

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀