Question: Using C Programming and #include Question 1 Define a suitable structure in C to hold the following data fields for AirAsia Flight. Flight { airline

 Using C Programming and #include Question 1 Define a suitable structurein C to hold the following data fields for AirAsia Flight. Flight{ airline flight_number destination departure_time gate_number } // e.g. AirAsia // e.g.AK503 // e.g. Singapore // e.g. 1005 // e.g. P10 By usingthe structure defined above, write a C program to prompt user for

Using C Programming and #include

Question 1 Define a suitable structure in C to hold the following data fields for AirAsia Flight. Flight { airline flight_number destination departure_time gate_number } // e.g. AirAsia // e.g. AK503 // e.g. Singapore // e.g. 1005 // e.g. P10 By using the structure defined above, write a C program to prompt user for any three flights and store the values into the structure. Question 3 Construct a C program to manipulate the strings below and print its output: Hint: char string1[10] "Computer"; char string2[10] = "Science"; char string3[10] = "of"; char string4[12] "Programming"; char dot[2] = "."; = Output: Computer Science Science of Computer Comp.Sc Computer Program The length of "Computer Program" is 16 characters. Question 4 Define a macro for each of the following: Reference: https://cs50.harvard.edu/resources/cppreference.com/preprocessor/define.html SQUARE(x) = To calculate the square value of x, e.g. SQUARE(5) = 25 CUBE(X) - To calculate the cube value of x, e.g. CUBE(3) = 27 ABSOLUTE(X) - To convert a negative integer x to positive, e.g. ABSOLUTE(-1) = 1 RADIAN_TO_DEGREE(X) - To convert radian to degree. T = PI = 3.14159 180 1 rad = 1 57.2958 7 Question 5 Construct a C program to implement a basic scientific calculator using that can perform: 0 Rad x! ( ) % AC Inv sin In 7 8 9 : COS log 4 5 6 e tan 1 2 3 - Ans EXP XY 0 + Simple Arithmetic Functions +, For example, 8 x 2 + 3 = 7 5+ 8 x 2 + 2 = 13 Special Functions: Factorial x!, logarithm log, squareroot , power x For example, 10% = 1000 Trigonometry Functions: sine sin, cosine cos, tangent tan For example, sin 30 + cos 60 = -1.94044460451 Bonus Question A strong password must contain: at least 8 characters long at least one uppercase alphabet A-Z at least one lowercase alphabet a-z at least a number 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 at least one symbol "~!@#$%^&* () _- + = {}[]\|:;"',.?/ Write a C program to validate whether a newly created password is strong. If not, your program should prompt the user to recreate a strong password that meets the above criteria. Hint:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!