C & C++ INNOVATIVE CA

Published on Slideshow
Static slideshow
Download PDF version
Download PDF version
Embed video
Share video
Ask about this video

Scene 1 (0s)

S.ABINAYA(205824102) S.JANANI(205824118) N.MONISHA(205824126) S.S.SIVANI(205824145) G.SUBHIKHSHA(205824149).

Scene 2 (8s)

C & C++ INNOVATIVE CA. TOPIC: C PROGRAMS ON CALENDAR.

Scene 3 (16s)

INTRODUCTION. The C programming language is a computer programming language that was developed to do system programming for the operating system UNIX and is an imperative programming language . The language has a small, fixed number of keywords, including a full set of control flow primitives: if/else , for , do/while , while and switch . User-defined names are not distinguished from keywords by any kind of sigil. It has a large number of arithmetic, bitwise, and logic operators: + , += , ++ , & , || ,etc..

Scene 4 (41s)

More than one assignment may be performed in a single statement. The first line of the program #include <stdio.h> is a preprocessor command, which tells a C compiler to include stdio.h file before going to actual compilation. The next line int main() is the main function where the program execution begins. The next line /*...*/ will be ignored by the compiler and it has been put to add additional comments in the program. So such lines are called comments in the program..

Scene 5 (1m 4s)

The next line printf(...) is another function available in C which causes the message "Hello, World!" to be displayed on the screen. The next line return 0; terminates the main() function and returns the value 0. # include <math.h> is used for mathematic functions in a program. The global section comprises of all the global declarations in the program. It is given by: float num = 2.54; int a = 5; char ch ='z‘;.

Scene 6 (1m 25s)

The size of the above global variables is listed as follows: char = 1 byte float = 4 bytes int = 4 bytes Main function is further categorized into local declarations, statements, and expressions. The curly braces mark the beginning and end of a function. It is mandatory in all the functions . scanf() It reads data from the standard input stream and writes the result into the specified arguments..

Scene 7 (1m 45s)

C PROGRAMS ON CALENDAR. C Programs to find the Leap Year C example to find the Day Name of a Week Days to Years Weeks and Days Number of Days in a Month.

Scene 8 (1m 56s)

C PROGRAMS TO FIND THE LEAP YEAR. /* C Program to Check Leap Year */ #include <stdio.h> int main() { int year; printf("\n Please Enter any year you wish \n "); scanf("%d", &year);.

Scene 9 (2m 9s)

if (( year%400 == 0)|| (( year%4 == 0 ) &&( year%100 != 0))) printf("\n %d is a Leap Year. \n", year); else printf("\n %d is not the Leap Year. \n", year); return 0; }.

Scene 10 (2m 21s)

17:zq S CppDroid Stopped Please Enter any 2026 terminal year you wish 2026 is not the Leap Year. Remove ad banner Get.

Scene 11 (2m 31s)

C PROGRAM TO FIND THE DAY NAME OF A WEEK. #include <stdio.h> int main() { int weekday; printf(" Please Enter the Day Number 1 to 7 (Consider 1= Monday, and 7 = Sunday) : "); scanf("%d", &weekday); switch (weekday).

Scene 12 (2m 43s)

{ case 1: printf("\n Today is Monday"); break; case 2: printf("\n Today is Tuesday"); break; case 3: printf("\n Today is Wednesday"); break; case 4: printf("\n Today is Thursday"); break;.

Scene 13 (2m 56s)

case 5: printf("\n Today is Friday"); break; case 6: printf("\n Today is Saturday"); break; case 7: printf("\n Today is Sunday"); break; default: printf("\n Please enter Valid Number between 1 to 7"); } return 0; }.

Scene 14 (3m 9s)

17:42 q, CppDroid terminal Stopped Please Enter the Day Number 1 to 7 (Consi der Monday, and 7 = Sunday) Today is Thursday' Remove ad banner 4 Get premium!.

Scene 15 (3m 19s)

C PROGRAM TO CONVERT DAYS TO YEARS WEEKS AND DAYS.

Scene 16 (3m 35s)

years = NoOfDays / 365; weeks = (NoOfDays % 365) / 7; days = (NoOfDays % 365) % 7; printf("\n Years = %d", years); printf("\n Weeks = %d", weeks); printf("\n Days = %d", days); return 0; }.

Scene 18 (3m 53s)

C PROGRAM TO PRINT NUMBER OF DAYS IN A MONTH. /* C Program to Print Number of Days in a Month using Else If Statement */ #include <stdio.h> int main() { int month; printf(" Please Enter the Month Number 1 to 12 (Consider 1 = January, and 12 = December) : "); scanf("%d", &month);.

Scene 19 (4m 9s)

if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12 ) else if ( month == 4 || month == 6 || month == 9 || month == 11 ) else if ( month == 2 ).

Scene 20 (4m 25s)

else if ( month == 2 ) else printf("\n Please enter Valid Number between 1 to 12"); return 0; }.

Scene 23 (4m 49s)

THANK YOU!!!. DONE BY: S.ABINAYA(205824102) S.JANANI(205824118) N.MONISHA(205824126) S.S.SIVANI(205824145) G.SUBHIKHSHA(205824149).