Start C Programming code typing Practice. Printf and Scanf in C, Global Variable typing practice in C, basic datatypes and constants in C typing Practice, Some Basic Programs in C.Click on the area below to start typing.
S.No.
Paragraph : Practice repeatedly whatever you would like most for full fifteen minutes
Lessions
click to Practice
1
#include
int main() {
/* Our first simple C basic program */
printf("Hello World! ");
getch();
return 0;
}
/*Documentation section
C programming basics & structure of C programs
Author: fresh2refresh.com
Date : 01/01/2012 */
#include /* Link section */
int total = 0;
int sum (int, int); /* Function declaration */
int sum (int a, int b){
return a + b; /* definition section */
#include
int main() {
float flt = 10.234;
int no = 150;
double dbl = 20.123456;
printf("Character is %c \n", ch);
printf("Float value is %f \n", flt);
printf("Integer value is %d\n" , no);
char ch;
char str[100];
printf("Enter any character \n");
scanf("%c", &ch);
printf("Entered character is %c \n", ch);
scanf("%s", &str);
printf("Entered string is %s \n", str);
}
#include
void test();int m = 22, n = 44;
int a = 50, b = 80;
int main() {
printf("All variables are accessed from main function");
printf("\nvalues: m=%d:n=%d:a=%d:b=%d", m,n,a,b);
test();
}
void test() {
printf("\n\nAll variables are accessed from" \
" test function");
printf("\nvalues: m=%d:n=%d:a=%d:b=%d", m,n,a,b);
}
#include
#include
int main() {
int a; char b; float c; double d;
printf("Storage size for int data type:%d \n",sizeof(a));
printf("Storage size for char data type:%d \n",sizeof(b));
printf("Storage size for float data type:%d \n",sizeof(c));
printf("Storage size for double data type:%d\n",sizeof(d));
enum MONTH { Jan = 0, Feb, Mar };
enum MONTH month = Mar;
if(month == 0)
printf("Value of Jan");
else if(month == 1)
printf("Month is Feb");
if(month == 2)
}