Basic C Programs
C Language - Basic Examples. Design and test sample C programs to display a message on screen. #include < stdio.h > int main() { printf("Hello, World!\n"); return 0; } Design and test C programs using constants, variables and data types. #include < stdio.h > int main() { // Constants const float PI = 3.14159; // Integer data types int intVar = 50000; long longVar = 1000000; long long longLongVar = 1234567890; // Floating-point data types float floatVar = 3.14; double doubleVar = 2.718281828; long double longDoubleVar = 1.414213562373; // Character and boolean types char charVar = 'A'; // Output printf("Demonstrating constants, variables, and all data types:\n\n"); // Integer types printf("Short: %hd\n", shortVar); pri...