Question
can someoem help me woht this C program as soon as possibel thanks in advance
Ex. 1. Write a C program Write the C statements to: Create a pointer pD of double type that points to a double variable d1 2.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Program :

#include <stdio.h>
int main()
{
double *pD;
double d1=2.5;
pD=&d1;
printf("Output the value of d1 using the variable d1 is :%lf",d1);
printf("\nOutput the value of d1 using the pD is :%lf",*pD);
printf("\nOutput the address of d1 using the variable d1 is :%u",&d1);
printf("\nOutput the address of d1 using the variable pD is :%u",pD);
return 0;
}

Screenshot of the program:

main.c 1 #include <stdio.h> 2 int main() double D double d1-2.5; 4 6 printf(Output the value of dI using the variable d1 is

Add a comment
Know the answer?
Add Answer to:
can someoem help me woht this C program as soon as possibel thanks in advance Ex....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can someone help me with these C program problems? Thanks 1. Write a C program that...

    Can someone help me with these C program problems? Thanks 1. Write a C program that creates two arrays of integers, one on the stack and one on the heap. You will loop through these arrays and populate them with values (any value is fine). You will then loop through these arrays again and print each value. Your output should look something like “Value in index 1 is 100 from stack array and 100 from heap array.” Do not forget...

  • I need help with my C coding homework. If possible can you please comment to help...

    I need help with my C coding homework. If possible can you please comment to help me understand whats going on in the code. Thanks in advance. Create a C program (3 points): o At the top of the file include the following comments: Your name The purpose (core concept found below) of the program The date created o Create two int variables: Initialize each to different values. o Create three pointers: Point the first two pointers to the first...

  • Need help with this C program based on threads. If someone could help as soon as...

    Need help with this C program based on threads. If someone could help as soon as possible thanks in advance. Write a multi-threaded C program using pthread_create() according to the following instructions: Your program should create exactly 2 new threads in the main() function, each of which invokes a different function. Print the thread IDs of the two new threads after they are created. The first newly created thread invokes the following function void *print_string_in_reverse_order(void *str)  {       // this function accepts...

  • 8. Given: struct STACK INF RC 1301 int top that the following functions have already been...

    8. Given: struct STACK INF RC 1301 int top that the following functions have already been declared in a stack tolkit and are available for create stack(s) push(s, item) pop(s, item) topls, item) empty(s) Boolean function use some or all of them to write the complete definition code for a function that passes in a stack (as an argument), removes the SECOND assume that there are at least two items in the stack). item (from the top) in the stack,...

  • Hello. I just need help with my c++ code. Write a program that: Creates an integer...

    Hello. I just need help with my c++ code. Write a program that: Creates an integer variable AND an integer pointer variable Ask the user to input an integer value Store the value in the integer variable Print the address of the variable. Make the pointer variable point at the integer value Print the value pointed to by the pointer Print the address of the pointer

  • Pointer tasks: ( In C++ ) 1. Write a program to store the address of a...

    Pointer tasks: ( In C++ ) 1. Write a program to store the address of a character variable and a float variable. • Print the address of both variables. • Print the values of variable using dereference operator. • Add 2 in float value using pointer. • Print address of character variable using reference operator. 2. Write a program that takes 5 elements in an array and print them in reverse order using pointers. 3. Write to program that takes...

  • [JAVA} Thanks in advance for your help! Write a program that asks the user to type...

    [JAVA} Thanks in advance for your help! Write a program that asks the user to type in ages. They will type a negative age when they finish entering the ages. The program will print out the average of all of the ages and the oldest age entered. It should end with a newline. Sample output #1 Type a negative for age to exit Enter your age: 21 Enter your age: 22 Enter your age: 21 Enter your age: -8 The...

  • Help. In language c View Layout References Mailings Program 1 Write a simple invoice generating program...

    Help. In language c View Layout References Mailings Program 1 Write a simple invoice generating program for a pet store as follows: 1- Ask the user for tee tax rate and store it in a float variable. 2- Ask the user for the number of cats being purchased and store the value in an integer variable. 3- Ask the user for the price of one cat and store it in a float variable. 4- Ask the user for the number...

  • Create the program in C++ please. The new operator as outlined in 10.9 . Create a...

    Create the program in C++ please. The new operator as outlined in 10.9 . Create a Test class that includes the following Data members • First Name, last name, test1, test2, test3 o Methods • Accessor methods for each of the data members' • Mutator methods for each of the data members . A Default Constructor . A constructor that will accept arguments for each of the 5 data members • A method that will calculate the average of the...

  • Can anyone help me to solve this problem? Thanks in advance Assignment 6 Strings Write a...

    Can anyone help me to solve this problem? Thanks in advance Assignment 6 Strings Write a program which makes Caesar encryption. Caesar encryption is based on circular shifting of the letters with a given amount. Your program will encrypt the input and it will shift the letters by the given amount (if it passes z, it will continue from a), it will not change spaces (" "). You can assume that no other characters will be entered.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT