1)
a)
Answer: X value is 74
Explanation:
since we are adding 'B' a char to int 8
'B' is converted to its ascii value that is 66
so, 66 is added to 8 = 74
b)
Answer: X value is 0.125
explanation:
usally the size of char is 1 byte
and size of 1.0 will 8 bytes because it will take 1.0 as
double
hence 1/8 =0.125
c)
Answer: X value is 190
explanation:
ascii value of 'A' :65
ascii value of 'B' :66
ascii value of 'C' :67
X = 65+67 - 2*4 + 66
=132-8+66
=198-8=190
1. (10pts) What is the value (in decimal) of X in each case below? Give the...
Need help with this C program? I cannot get it to compile. I have to use Microsoft Studio compiler for my course. It's a word game style program and I can't figure out where the issue is. \* Program *\ // Michael Paul Laessig, 07 / 17 / 2019. /*COP2220 Second Large Program (LargeProg2.c).*/ #define _CRT_SECURE_NO_DEPRECATE //Include the following libraries in the preprocessor directives: stdio.h, string.h, ctype.h #include <stdio.h> /*printf, scanf definitions*/ #include <string.h> /*stings definitions*/ #include <ctype.h> /*toupper, tolower...
Intro to Programming in C – Large Program 1 – Character/ Number converter Assignment Purpose: To compile, build, and execute an interactive program with a simple loop, conditions, user defined functions and library functions from stdio.h and ctype.h. You will write a program that will convert characters to integers and integers to characters General Requirements • In your program you will change each letter entered by the user to both uppercase AND lowercase– o Use the function toupper in #include...
Need help in C
(a) Write a C program to read in a line of text and count the occurrence of each English alphabet. The lowercase version of a letter is considered the same as the uppercase. To make viewing easy, the frequencies should be presented using a bar chart as follows. You can assume that the input contains only spaces, lowercase letters, uppercase letters and the newline character (i.e. the Enter key). Enter a line of text: Letter ZZz...
Question- How would I allow the program to run both upper and lower case letters. How would I write a switch statement for upper and lower cases to see if the value entered for Grade2 is a A or a? C programming int main() { char Grade2; float gradepoint; char Grade = 'X'; // Declares a character type variable named Grade printf("Enter a grade\t"); // Prompts for Grade scanf("%c", &Grade); // Inputs Grade printf("Grade is: \t%c\n", Grade); // Prints the...
c
program
void funcint x, int *y) { 1. Whof the Rings gical ASA All of the above 1.0.2.4) What will be the out of the de int, pat) A) 10 12 (1.03.2) What will be the output of the following int , printf(d, a,b); A) & B) 17 11.12 D) 17.25 13. (L032) An array is a group of memory locations related by the fact that they all have my name and pe A) different different B) same, different...
C
program
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 declare an array of doubles with two indices, such that the first index can 22 (LOL) The following code will print out: 23. (L02.) The following code will print out: PART 2 Fill in the banks questions 3 marts x + 5; else x -- 2; char "stri - "abcd"; char str2[]...
Number 3-7
(15 pts) Dedare a character array of sine 10. Wite a loop to naice the aay with consecutive letters staring at the letter Ty (10 pts) Dedlare a two-dimensional int atmay of sine 4 Brow mn and ntialge the s element of every row to 6 and the remaining elements to0 at the ame time of declaration Use as short statement wherever possible The fllowing problems are assigned for lecture 23 Functions Do them after the lecture (15...
Question 1 What is the value of x after the following int x = 5; x++; x++; x+=x++; A)14 B)10 C)13 D)15 Question 2 The last line in value returning function (before the }) should contain the word return. True False Question 3 This contains three parts: Void or Data Type the name optional parameter list A)Menu System B)Function Header C)Switch Question 4 What is a variable? A)a pointer B)a place in memory to hold data C)int D)a computer programming...
UGRENT!! WHAT TO DO IS MENTIONED IN THE COMMENTS The functions are easy but since I'm new to C language, I'm struggling with it. Please help me out with correct answers!!! #include <stdio.h> char random_letter(); /***************** FIX THE 5 FUNCTIONS BELOW ************************/ /* * IMPORTANT!!! * The only functions you may call are printf and random_letter */ /* * Returns 1 if i is negative and 0 otherwise */ int is_negative(int i) { return 0; } /* * Returns the...
Missing multiple labeled functions. Card matching game in C. Shouldn't need any more functions. I am lost on how to complete the main function (play_card_match) without the sub functions complete. The program runs fine as is, but does not actually have a working turn system. It should display question marks on unflipped cards when the player is taking a turn and should also clear the screen so the player can't scroll up to cheat. Thank you #include "cardMatch.h" //main function /*...