DFATA BASE MANAGEMENT SYSTEM
Notes for BCA BSC BSc.SE
Windows Programming using C#
Chapter 1 Introduction
Chapter 2 Windows Application and Control
Chapter 3 Function array String Property, delegate and event
Chapter 4 Database Connectivity
Fundamentals of Computer Science and Information technology
chapter 1 Introduction to Computer and History
chap 2 Computer Peripherals & Memory
Variables in C are associated with data type. Each data type requires an amount of memory and performs specific operations.
There are some common data types in C −
int − Used to store an integer value.
char − Used to store a single character.
float − Used to store decimal numbers with single precision.
double − Used to store decimal numbers with double precision.
#include <stdio.h>
int main() { // datatypes int a = 10; char b = 'S'; float c = 2.88; double d = 28.888; printf("Integer datatype : %d\n",a); printf("Character datatype : %c\n",b); printf("Float datatype : %f\n",c); printf("Double Float datatype : %lf\n",d); return 0;
Control statement
if statement:-
//C
program structure
/**
//
file: age.c //Documentation
* author: you
* description: program to find our age.
*/
#include <stdio.h> //Link
#define BORN
2000 //Definition
int
age(int current); //Global
Declaration
int
main(void) //Main()
Function
{
int current
= 2021; //Local
declaration
printf("Age: %d", age(current));
return 0;
}
int
age(int current)
{ return current - BORN;
//Subprograms
}