Create a function which receives a pointer of array as a parameter and calculates the sum of prime
numbers and sum of non_prime numbers in that array. Then compares them to find out which one is
larger (sum of prime or sum of non_prime). Return both sum of prime and sum of non_prime numbers
also and print those in the main function.
Create a function to compare the elements of 2 arrays. Function should receive two pointers to an array
and then check if the elements are same in both arrays or not. If both arrays are same return true,
otherwise false.
Suppose you want to send a message to your friend but don’t want others to understand that message.
So, you have decided to encrypt the message.
Now, suppose the message is in a string variable called MSG. a) You have to encrypt the message and
change the string so that others cannot understand it. b) Again, decrypt the encrypted message.
what is the most typical used measure of a country's level of development
a) Method getData: This method reads and stores the data in the two-dimensional list.
b) Method averageHigh: This method calculates and returns the average high temperature of the year.
c) Method averageLow: This method calculates and returns the average low temperature of the year.
d) Method indexHighTemp: This method returns the index of the highest temperature in the list.
e) Method indexLowTemp: This method returns the index of the lowest temperature in the list.
Store the details of the following 3 flights in a 2-dimensional tuple:
Flight number Destination Departure time
EK004 London 12:30
EK012 Paris 14:00
EK052 Male 16:15
Create a function called checkFlightNumber which accepts a flight number as an input parameter. This function will check if the flight number is found in the tuple which contains the flight details and return TRUE of found or FALSE if it is not.
Your program should keep asking for passengers’ (loop)details until the user enters n to stop. The program should first ask for the passengers’ flight number and use the checkFlightNumber function to check if it is valid or not. If checkFlightNumber returns FALSE, your program will print an appropriate error message and ask the user to try again. However, if checkFlightNumber returns TRUE, your program should ask
the user to enter the following passenger details:
1.Name
2.Date of birth
3. Passport number
A person riding a bicycle is going uphill at 8 m/s. What is the kinetic energy of the system if the total mass of the person and his bicycle is 10.0 kg?
How many cards must you draw from a deck of cards to ensure you get at least 3 cards of the same colour?(red or black)
Suppose, you have a utility function u(X1,X2) = X1 X2. Your budget constraint is 3X1+2X2= 60.
X1 and X2 are the amount of consumption of the two goods. Find the equilibrium level of utility.
For the following reaction at 373 K, Kc = 0.50. If the initial concentration of N2O4 is 0.152 M, what is the equilibrium concentration of NO2?
N2O4 (g) ⇆ NO2 (g)