C Answers

Questions answered by Experts: 1 680

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Write a program in C to show the basic declaration of pointer. 


Pointer : Show the basic declaration of pointer :                                                            
-------------------------------------------------------                                                       
 Here is m=10, n and o are two integer variable and *z is an integer                                          
                                                                                                              
 z stores the address of m  = 0x7ffd40630d44                                                                  
                                                                                                              
 *z stores the value of m = 10                                                                                
                                                                                                              
 &m is the address of m = 0x7ffd40630d44                                                                      
                                                                                                              
 &n stores the address of n = 0x7ffd40630d48                                                                  
                                                                                                              
 &o  stores the address of o = 0x7ffd40630d4c                                                                 
                                                                                                              
 &z stores the address of z = 0x7ffd40630d50      





1. Pyramid Schemes

They said pyramids were created by aliens, so if you can make a pyramid you might be able to qualify as an alien.


Instructions:

  1. In the code editor, you are provided with a main() function that asks the user for an integer input n, and passes this value to the function call of the generatePattern() function.
  2. Your task is to implement this generatePattern() function which has the following description:
  3. Return type - void
  4. Function name - generatePattern
  5. Parameters - 1 integer n
  6. Description - this function prints a triangular pattern of letter T's based on the value of n. For more information, refer to the output in the test cases
  7. DO NOT EDIT ANYTHING IN THE MAIN

Input


1. Integer n

Output


Enter·n:·4
T
TT
TTT
TTTT
  1. Create 4 variables and assign each one to the following values:
  2. the letters M, V, and P on the first three variables
  3. the number 10 on the fourth variable
  4. You may name the variable anything you want as long as it follows proper naming convention.
  5. Using the variables you've created, print the cheer message like the one displayed in the sample output. The first line contains the cheer message for the MVP, and the second line containing a cheer message with the MVP’s jersey number, all in uppercase.
  6. Make use of placeholders to achieve the same result as that of the sample output.
  7. An initial code with the 2 printf()'s needed for this problem is already provided for you. Just fill in the blanks.

We Filipinos are quite known for the habit of leaving at least one of the many pieces of food on the plate as it can't be equally divided among all at most times. Just like when 3 people decide to eat a pizza of 10 slices, there will often be at least one slice left on the box. To accurately show just how many pieces of things are left when divided by a certain number, we code it using modulo.


Care to do it for me?


Input


1. First integer


2. Second integer


Output


The first line will contain a message prompt to input the first integer.

The second line will contain a message prompt to input the second integer.

The last line contains the remainder.


Enter·the·first·integer:·10

Enter·the·second·integer:·3

Remainder·=·1


We Filipinos are quite known for the habit of leaving at least one of the many pieces of food on the plate as it can't be equally divided among all at most times. Just like when 3 people decide to eat a pizza of 10 slices, there will often be at least one slice left on the box. To accurately show just how many pieces of things are left when divided by a certain number, we code it using modulo.



Care to do it for me?



Input



1. First integer



2. Second integer



Output



The first line will contain a message prompt to input the first integer.


The second line will contain a message prompt to input the second integer.


The last line contains the remainder.



Enter·the·first·integer:·10


Enter·the·second·integer:·3


Remainder·=·1

3. Leftovers




by CodeChum Admin





We Filipinos are quite known for the habit of leaving at least one of the many pieces of food on the plate as it can't be equally divided among all at most times. Just like when 3 people decide to eat a pizza of 10 slices, there will often be at least one slice left on the box. To accurately show just how many pieces of things are left when divided by a certain number, we code it using modulo.





Care to do it for me?





Input





1. First integer





2. Second integer





Output





The first line will contain a message prompt to input the first integer.




The second line will contain a message prompt to input the second integer.




The last line contains the remainder.





Enter·the·first·integer:·10




Enter·the·second·integer:·3




Remainder·=·1

Write a loop that will calculate the sum of every third integer beginning with i = 2 (i-e. calculate the sum of 2+5+8+11+) for all values of i that are less than 100, Write the loop in



two ways:



(1) Using a do---- while statement.



() Using a for statement.

Write a loop that will calculate the sum of every third integer beginning with i = 2 (i-e. calculate the sum of 2+5+8+11+) for all values of i that are less than 100, Write the loop in




two ways:




(1) Using a do---- while statement.




() Using a for statement.

Write a C program which will take numbers from the keyboard until the sum of these numbers is greater than 100 . On monitor display the sum min and average of numbers


Write a C program which will take an integer number from keyboard and display its digits on separate lines on monintor using a loop


LATEST TUTORIALS
APPROVED BY CLIENTS