This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
void Fill_array(double array[], int size); | |
void Show_array(const double array[], int size); | |
void Reverse_array(double array[], int size); | |
int main() | |
{ | |
// using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
const int Max = 5; | |
// function prototypes | |
double * fill_array(double ar[], int limit); | |
void show_array(const double ar[], double * n); | |
void revalue(double r, double ar[], double * n); | |
int main() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
const int SLEN = 30; | |
struct student { | |
char fullname[SLEN]; | |
char hobby[SLEN]; | |
int ooplevel; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double add(double x, double y); | |
double sub(double x, double y); | |
double calculate(double x, double y, double (*pf[2])(double, double)); | |
#include <iostream> | |
int main() | |
{ | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
const int max_str_len = 255; | |
void silly_function(char * print_string, int flag = 0); | |
int main() | |
{ | |
using namespace std; | |
char sample_string[max_str_len] = "Hello, world!"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstring> | |
const int MAX_STR_LEN = 255; | |
struct CandyBar | |
{ | |
char brand[MAX_STR_LEN]; | |
double weight; | |
int calorie; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
#include <cstring> // for strlen(), strcpy() | |
struct stringy { | |
char * str; | |
int ct; | |
}; | |
void set(stringy & stringy_ref, char * cstring); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <cctype> | |
using namespace std; | |
void capitalize_all(string & text); | |
int main() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
const int ARRAY_SIZE = 5; | |
template <typename T> | |
T max5(T number[]); | |
int main() | |
{ | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstring> | |
template <typename T> | |
T maxn(T number[], int num_of_elements); | |
template <> const char * maxn(const char * cstring_array[], int num_of_cstrings); | |
int main() | |
{ |