请问这个要怎么解决?在//REPLACE ME WITH YOUR CODE那写内容,在sign_flip.c上写内容,按照要求来写,要写main函数,就像最下面的图片的例子那样。在可以用下面的例子来测试是否正确。原题为英文,有机翻。da佬编写1下,蟹蟹大lao。题目如下
sign_flip.c内容
#include "sign_flip.h"
// given the 32 bits of a float return it with its sign flipped
uint32_t sign_flip(uint32_t f) {
return 42; // REPLACE ME WITH YOUR CODE
}
```c
sign_flip.h内容
#ifndef SIGN_FLIP_H
#define SIGN_FLIP_H
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
/// We use `union overlay' to obtain the raw bits of a `float'-type
/// value, by storing the `float' in the `f' field and then using the
/// `u' field to obtain the bits.
union overlay {
float f;
uint32_t u;
};
uint32_t sign_flip(uint32_t f);
#endif