Question
this is c code. please answer all questions on a piece of paper and show work. i need to prepare as i have a midterm i will have to be completing on paper

1) Bit Operators: This C program compiles and runs. What is its output? 1) #include <stdio.h> 2) void main (void) 3) unsigned
cs.unm.edu https://www.cs.unm.edu/-joel/cs241/axam/CS-; 1/exam/CS-241-Midterm-2015-Spring.pdf 2) Bubble Sort. This C program
3) This C program compiles and runs. What is its output? 1) #include <stdio.h> 2) #include <string.h> //for strlen (s) return
4) Squeeze: removing a character from a string in place. This C program compiles and runs. What is its output? 1) #include <s
https://www.cs.unm.edu/-joel/cs241/exam /-joel/cs241/exam/CS-241-Midterm-2015-Spring.pdf 5) Quicksort: This C program compile
0 0
Add a comment Improve this question Transcribed image text
Answer #1

*****************************************************************************
PLEASE DO UPVOTE IF THE ANSWER IS HELPFUL AS IT GIVES THE CONFIDENCE TO HELP MORE STUDENTS
*****************************************************************************
Chegg allows me to answer specific no of questions including the sub parts , so please do post the rest of the questions as a separate query as per Chegg Guidelines. Thank you :)
*****************************************************************************

aja b) Unsigned char. 8 bits. xzoo - 00111100 <- 01111 000 = 120 a E 24 00111100 00011000 wgical and 0001100 a & & 24 = 24 g

Add a comment
Know the answer?
Add Answer to:
this is c code. please answer all questions on a piece of paper and show work....
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
  • The following C code keeps returning a segmentation fault! Please debug so that it compiles. Also...

    The following C code keeps returning a segmentation fault! Please debug so that it compiles. Also please explain why the seg fault is happening. Thank you #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // @Name loadMusicFile // @Brief Load the music database // 'size' is the size of the database. char** loadMusicFile(const char* fileName, int size){ FILE *myFile = fopen(fileName,"r"); // Allocate memory for each character-string pointer char** database = malloc(sizeof(char*)*size); unsigned int song=0; for(song =0; song < size;...

  • c++ please read all question edit the program to test different random sizes of the array and give me the time in a file will be like random size of the array and next to it the time it took for each...

    c++ please read all question edit the program to test different random sizes of the array and give me the time in a file will be like random size of the array and next to it the time it took for each size Im trying to do time analysis for Quick sort but i keep getting time = 0 also i want edit the program to test different random sizes of the array and give me the time in a...

  • I'm trying to code a C program so it sorts an array of integer numbers of...

    I'm trying to code a C program so it sorts an array of integer numbers of size n in ascending order. My code is written below but its not working properly, its giving me errors, I think my sort and swap functions aren't done right maybe, please help and fix. It says "undefined reference to "SelectionSort" as an error. But the question asks to not change the PrintArray and Main function. #include <stdio.h> void PrintArray(int size, int array[]) { for...

  • 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...

  • PLease explain output of these two programs: 1. #include <stdio.h> typedef struct { char *name; int...

    PLease explain output of these two programs: 1. #include <stdio.h> typedef struct { char *name; int x, y; int h, w; } box; typedef struct { unsigned int baud : 5; unsigned int div2 : 1; unsigned int use_external_clock : 1; } flags; int main(int argc, char** argv){ printf("The size of box is %d bytes\n", sizeof(box)); printf("The size of flags is %d bytes\n", sizeof(flags)); return 0; } 2. #include <stdio.h> #include <string.h> /* define simple structure */ struct { unsigned...

  • A)Correct this code and explain what was corrected // C code - For Loop / Array...

    A)Correct this code and explain what was corrected // C code - For Loop / Array Population // This program will populate integers into an array, and then display those integers. // Developer: Johnson, William CMIS102 // Date: Mar 4, 2020 // Global constants #define INTLIMIT 10 #include <stdio.h> // This function will handle printing my name, class/section number, and the date void printStudentData() { char fullName[19] = "William J. Johnson"; char classNumber[9] = "CMIS 102"; char sectionNumber[5] = "4020";...

  • PART FOUR:(20 points) Predict the output that would be shown in the terminal window when the...

    PART FOUR:(20 points) Predict the output that would be shown in the terminal window when the following program fragments are executed 1. Assume that an int variable takes 4 bytes and a char variable takes 1 byte #include<stdio.h> int main() int A[]-{10, 20, 30, 40); int *ptrl - A; int ptr2 = A +5; printf("The Resull: %d\n".(ptr2-ptrl)); printf("The Resul2: %d\n".(char*)ptr2-(char*)ptr); return 0; 2. What does the following program print? #include <stdio.h> int main(void) unsigned int x 1: unsigned int total...

  • The goal is to generate some random number and output a sorted list by quicksort. what...

    The goal is to generate some random number and output a sorted list by quicksort. what do I need to add in my main to accomplish that? i also want it to output the run time. thank you #include "pch.h" #include <iostream> using namespace std; /* C implementation QuickSort */ #include<stdio.h> void swap(int* a, int* b) {    int t = *a;    *a = *b;    *b = t; } int partition(int arr[], int low, int high) {   ...

  • Convert C to C++ I need these 4 C file code convert to C++. Please Convert...

    Convert C to C++ I need these 4 C file code convert to C++. Please Convert it to C++ //////first C file: Wunzip.c #include int main(int argc, char* argv[]) { if(argc ==1){ printf("wunzip: file1 [file2 ...]\n"); return 1; } else{ for(int i =1; i< argc;i++){ int num=-1; int numout=-1; int c; int c1;    FILE* file = fopen(argv[i],"rb"); if(file == NULL){ printf("Cannot Open File\n"); return 1; } else{ while(numout != 0){    numout = fread(&num, sizeof(int), 1, file);    c...

  • If void * is a pointer to void is a "generic" pointer type, and a void...

    If void * is a pointer to void is a "generic" pointer type, and a void * can be converted to any other pointer type * without an explicit cast, why in the ,myarrcopy function the malloc is created like char and not like void? if we are going to work with different type of arrays? Here is de program: *This is a function that make a copy of any given array. * We then use this function make a...

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