Title | C programming notes |
---|---|
Author | Anonymous User |
Course | BSc radiography |
Institution | National Institute of Mental Health and Neuro Sciences |
Pages | 4 |
File Size | 228.1 KB |
File Type | |
Total Downloads | 10 |
Total Views | 161 |
j.k raut...
C programming notes C programming notes in chapter 1--- basic concept of 'c' language
1.#include #-- Pre-processor Include-- pre-processor command Stdio-- standard input output (full form) .h-- header file extension 2.#include #-- Pre-processor Include-- pre-processor command Conio-- console input output(full form) .h-- header file extension 3. What is Programming? Ans. Computer programming is a medium for us to communicate with computers. Just like we use hindi or english to communicate with each other programming is a way for us to deliver our instruction to the computer. 4. What is 'c' ? ans. 'c' is a programming language . 'c' is one of the oldest and finest programming language. 'c' was developed from ALGOL, BCPL,and B by DENNIS RITCHIE at AT&T'S BELL Laboratories, in 1972. 5. Uses of c. ans: C language is used to program a wide variety of system some of the uses of c are as follows: 1. Major parts of windows, linux and other operating system are written in c. 2. c is used to write driver programs for devices like tablets, printers etc.
in
3. C language is used to program embedded system where programs need to run faster limited memory .
to
4. C is used to develop games an area where latency is very important .ic.computer has react quickly on user input.
calculate swapping value without third variable #include
void main() { int a,b;//a=10,b=20 printf("enter value of a="); scanf("%d",&a);
printf("enter value of b="); scanf("%d",&b);
a=a+b;//a=10+20=30 b=a-b;//b=30-20=10 a=a-b;//a=30-10=20
printf("swapping value is="); printf("a=%d b=%d",a,b);
} INPUT---
OUTPUT---
calculate days and months in c program
#include void main() { int days, months; printf("enter days:\n"); scanf("%d",&days);
months=days/30; days=days%30; printf("months=%d,days=%d",months,days);
} input-
output-...