For the code below:
![charmSoftware quizzes are fun!; int i 0 for(i; i < sizeof (msg)/sizeof (msg [0]) i++) msg [i] % 5-0 ? msg [i] + a : msg [i]](http://img.homeworklib.com/images/16e487a5-3d8a-4ff9-b89c-e9dfd9aafdb6.png?x-oss-process=image/resize,w_560)
The output is: ]oftwkre q izze} are*fun!
What is the decimal value of a?

For the code below: The output is: ]oftwkre q izze} are*fun! What is the decimal value of a?
QUESTION 6 What is the output of following C code? struct numbers { int x = 2; int y = 3; } int main() { struct numbers nums; nums.x = 110; nums.y = 100; printf("%d\n%d", nums.x, nums.y); return 0; } A. Compile-time Error B. 110 100 C. 2 3 D. Run-time Error 2 points QUESTION 7 What is the output of following C code? typedef struct student { char *stud; }s1; int main() { s1 s; s.stud...
please help me with this question
(in C programming language and Unix)
computer system book 3 edition
int *fun (int *x)f int value *xtt return &value; int main) int pl; int **p2; int a; char str [5] printf ("Enter a number:") scanf("%d", a) ; printf ("Enter a line:") gets (str); p1-malloc(sizeof (int)) *pl-p2; p2-malloc(sizeof (int)); pl-fun (a); n-0; for (pl-stripl<-str+5;pl++) if (isdigit (pl)) at+; return 0; Construct a table that shows for each line of code, what may be the...
What is the output, to the console, once the following code has executed? int collatz(int value) { if(value % 2 ==0) return value /2; else return value * 3+1; } int main() { int currentValue=1; int i; for (i=0; i<5; i++) { printf("%d\n", currentValue); currentValue= collatz(currentValue); } return 0; }
int *fun(int *p) { while(*p >= 0) p++; return p; } void main() { I int *a; int v[8]={1,2,3,-4,5,6,7,8); q = fun(); printf("%d", _Missing_1_); printf("%d", -_Missing_2_); } However, part of the code is missing (indicated by). The code is supposed to give the output -46 What can the missing parts be? DS (4 Points) Missing 1: * Missing 2: [2] Missing_1: V[4] Missing 2: [2] Missing 1: *q Missing 2: q[1] Missing 1: *(q+1) Missing 2: *(q+2)
Fix the code. Use Valgrind to compile below code with no warning and no memory error. Also give a comment about how you fix the code. gcc -std=c99 -pedantic -Wall -Wextra -ftrapv -ggdb3 $* -o question5 question5.c && ./question5 gcc -std=c99 -pedantic -Wall -Wextra -ftrapv -ggdb3 -fsanitize=address -o question5 question5.c && ./question5 Both of these should get the same output . For example if we input 65535 4 3 2 1 it should give us a output with What is...
Given the following code in C, what is the output of this program? (10 Points) int mainO f 5. int i=10; for(int j-l;j-3;j++) int i=5 printf("i=%dn', i); printf("f%d\n", i); return 0;
Q4) what is the output after the code below is executed? #include <stdio.h> #1 nclude<string.h> int main) char abc[100]-"Good Luck in Your Programming Final" int i, ; while(abc[i]!= '\0'){ if(abc[i]' if(abc[i+1]-'&&abci+1] -'0' else printf"c", abcli-1]) printf("\n w = %d return 0; \n", w); Place you answer here 4 l Page
c programming What is the output, to the console, once the following code has been executed? int collatz(int value) { if(value % 2 == 0) return value / 2; else return value * 3 + 1; } int main() { int currentValue = 1: int 1; for (i = 0; i < 5; i++) { printf("%d\n", currentValue); currentValue = collatz(currentValue); } return 0; }
Modify the client server system program given below so that instead of sendto() and recvfrom(), you use connect() and un-addresssed write() and read() calls. //Server.c #include #include #include #include #include #include #include #include #include #include # define PortNo 4567 # define BUFFER 1024 int main(int argc, char ** argv) { int ssd; int n; socklen_t len; char msg[BUFFER]; char clientmsg[BUFFER]; struct sockaddr_in server; struct sockaddr_in client; int max_iterations = 0; int count = 0, totalChar = 0, i = 0;...
I'm having trouble getting my program to output What is your first name? damion what is your last name? anderson damion, Your first name is 6 characters Your last name, anderson, is 8 characters Your name in reverse is: noimad nosredna This is my code so far: #include <stdlib.h> #include <stdio.h> void sizeOfName(char** name); void printSizeOfName(int *first, int *last, char** name); void reverseString(int *first, int *last, char** name); int main() { char** name; name = (char**)malloc(2*sizeof(char*)); name[0] = (char*)malloc(100*sizeof(char)); name[1]...