Question

take values to 9 and the second can take values to 12 if (x > 2^3) printf(d, x); Int s-e; 21. LOST) Write a statement that

C program
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answers:-

22 . after executing the given program we get output as 9

23. 8 5 5

24 . 56

25.It prints nothing

Add a comment
Know the answer?
Add Answer to:
C program take values to 9 and the second can take values to 12 if (x...
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
  • Give the output for the following C code, assuming strl is located at address 100 and...

    Give the output for the following C code, assuming strl is located at address 100 and str2 is located at address 200: (If no output, enter 'nothing! Enterunknown' if cannot be determined.) char stri[] = "Swinney"; char str2[] = "win"; int main(void) { int k; k = (int) strstr(&str1[2] , &str2(11): printf("%d", k); }

  • Can I please get some assistance on this? 1. Write a program to test the correctness...

    Can I please get some assistance on this? 1. Write a program to test the correctness of a password according to some rules. If the password is not valid, print messages showing what's wrong with the password. Partial program output should look like this: Please enter a password. It must be at least 8 characters long and contain at least 2 alpha characters, at least one upper case and one lower case, at least 1 numbers, and at least 1...

  • Language is in C. Need help troubleshooting my code Goal of code: * Replace strings with...

    Language is in C. Need help troubleshooting my code Goal of code: * Replace strings with a new string. * Append an s to the end of your input string if it's not a keyword. * Insert a period at the end, if you have an empty input string do not insert a period Problems: //Why does my code stop at only 2 input strings //If I insert a character my empty string case works but it's still bugged where...

  • OPERATING SYSTWM Question 31 What is the output of this C program? #include #include void main()...

    OPERATING SYSTWM Question 31 What is the output of this C program? #include #include void main() int mptr, *cptr mptr = (int*)malloc(sizeof(int)); printf("%d", "mptr); cptr = (int)calloc(sizeof(int),1); printf("%d","cptr); garbage 0 000 O garbage segmentation fault Question 8 1 pts If this program "Hello" is run from the command line as "Hello 12 3" what is the output? (char '1'is ascii value 49. char '2' is ascii value 50 char'3' is ascii value 51): #include<stdio.h> int main (int argc, char*argv[]) int...

  • write C code that uses pointers, arrays, and C strings. 3. Write a function called pow_xy....

    write C code that uses pointers, arrays, and C strings. 3. Write a function called pow_xy. The function should be passed 2 parameters, as illustrated in the prototype below. int pow_xy(int *xptr, int y); Assuming that xptr contains the address of variable x, pow_xy should compute x to the y power, and store the result as the new value of x. The function should also return the result. Do not use the built-in C function pow. For the remaining problems,...

  • Can someone help me out with this? You are given a program that receives four lines...

    Can someone help me out with this? You are given a program that receives four lines in the below format, and stores them in str1, str2, str3, and num1. This is not a very long sentence. is long 4 Expand this program to: Write an if-elseif-else statement to print this line only if num1 is higher than 0: "Num1 is higher than 0!" print this line only if num1 is 0: "Num1 equals to 0!" And otherwise, print: ""Num1 is...

  • Note that the main function that I have provided does use <string.h> as it constructs test...

    Note that the main function that I have provided does use <string.h> as it constructs test strings to pass to your functions. However, your solutions for the 5 functions below may not use any of the built-in C string functions from the <string.h> library. Write a function called strcmp373. This function is passed two parameters, both of which are C strings. You should use array syntax when writing this function; that is, you may use [ ], but not *...

  • C programming Question1 (a) Write a C program that will print out all command line arguments,...

    C programming Question1 (a) Write a C program that will print out all command line arguments, in reverse order, one per line. Prefix each line with its index. 6 marks] (b) Consider this C code snippet int a- 100 int b- 42; inte p- &a; int q-b; p qi printf ("%d %d\n" ,a,*p); When this code is executed, what numbers will it print? [2 marks] (c) Consider this C program int main(int argc,char argv) char* target- "Apple" char vord[100] printf...

  • Take the following C++ code and add to it the following: Write a program that reads...

    Take the following C++ code and add to it the following: Write a program that reads a string and outputs the number of times each lowercase vowel appears in it. Your program must contain a function with one of its parameters as a char variable, and if the character is a vowel, it increments that vowel's count. #include<iostream> #include<string> using namespace std; int countVowel(char, char); int main(void) { string str1; int countA = 0; int countE = 0; int countI...

  • CSC Hw Problems. Any help is appreciated I dont know where to start let alone what...

    CSC Hw Problems. Any help is appreciated I dont know where to start let alone what the answers are. Your assignment is to write your own version of some of the functions in the built-in <string.h> C library. As you write these functions, keep in mind that a string in C is represented as a char array, with the '\0' character at the end of the string. Therefore, when a string is passed as a parameter, the length of the...

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
ADVERTISEMENT