Tuesday, 14 February 2017

o/p ?

Friday, 10 February 2017

Escape Sequence Example

  1. #include <stdio.h>      
  2. #include <conio.h>    
  3. void main()
  4. {      
  5. int number=50;    
  6. clrscr();      
  7. printf("You\nare\nlearning\n\'c\' language\n\"Do you know C language\"");  
  8. getch();      
  9. }      
Output:
You
are
learning
'c' language
"Do you know C language

https://www.facebook.com/Avirag16/


Tuesday, 7 February 2017

Java has 50 keywords.Bt words like true,false and null can not be used a name of variables.These values are defined by Java .

Monday, 30 January 2017

Ques : What is the output of this program ?

#include<stdio.h>
int main()
{
int a=2,b=4;
if(a||b++)
{
printf("%d",a+b);
}
}

@k
C-PROGRAM FOR THE ANALOG CLOCK :


#include<stdio.h>
#include<graphics.h>
#include<dos.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
int i,gd=DETECT,gm ;
struct time t ;
float p,q,r;
initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
for(i=0;i<120;i++)
{
setcolor(BLACK);
putpixel(200,200,WHITE);
circle(200,200,100) ;
outtextxy(190,110,"12");
outtextxy(195,280,"6");
outtextxy(110,200,"9");
outtextxy(280,200,"3");
outtextxy(270,160,"2");
outtextxy(120,240,"8");
outtextxy(240,130,"1");
outtextxy(150,270,"7");
outtextxy(270,240,"4");
outtextxy(240,270,"5");
outtextxy(140,130,"11");
outtextxy(115,160,"10");
gettime(&t);
printf(" %d %d %d ",t.ti_hour%12,t.ti_min,t.ti_sec) ;
p=t.ti_sec*3.14/30-3.14/2;
q=t.ti_min*3.14/30-3.14/2;
r=(t.ti_hour%12)*3.14/30-3.14*1.25;
setcolor(RED);
line(200,200,200+80*cos(p),200+80*sin(p));   setcolor(BLUE);
line(200,200,200+60*cos(q),200+60*sin(q));
setcolor(GREEN);
line(200,200,200+40*cos(r),200+40*sin(r));
delay(1000); clrscr();
    }
getch();      

}

@k

Sunday, 29 January 2017

Ques : what is the o/p of this code ?

#include<stdio.h>
int main()
{
printf("%s",__DATE__);
}

@k

     FACTS ABOUT C-LANGUAGE :

  • C was invented to write an operating system called UNIX.
  • C is a successor of B language which was introduced around 1970
  • The language was formalized in 1988 by the American National Standard Institue (ANSI).
  • By 1973 UNIX OS almost totally written in C.
  • Today C is the most widely used System Programming Language.
  • Most of the state of the art software have been implemented using C