Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkh9 committed Jan 11, 2023
1 parent ea42be3 commit d410164
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
11 changes: 11 additions & 0 deletions exam_practise/char.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* Copyright (C) 2023 Harry Clark - Student No. 12340530 */
/* Date: 11/01/23 */

#pragma once

#ifndef CHAR
#define CHAR

char myVariable = '@';

#endif
37 changes: 37 additions & 0 deletions exam_practise/return.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* Copyright (C) 2023 Harry Clark - Student No. 12340530 */
/* Date: 11/01/23 */

#pragma once

#ifndef BOOL_RETURN
#define BOOL_RETURN

#include <iostream>

#define TENARY_VER
bool is_answer(int value)
{
return value == 42 ? true : false;
}

#define IF_ELSE_VER
bool is_answer(int value)
{
if (value == 42)
{
return true;
}

else
{
return false;
}
}

#define SIMPLIFIED
bool is_answer(int value)
{
return value == 42;
}

#endif

0 comments on commit d410164

Please sign in to comment.