1, 2 and 4 appear to be trick questions.
There is no built-in integer type that can represent a "strictly positive integer value".
If these questions were set buy a career teacher, there is a distinct possibility that "strictly positive" is being confused with "non-negative".
There is also delicious ambiguity in the terms "small" and "large".
1. Define a variable named Marks to represent a small strictly positive integer value and assign it a value of 89.
1 2
|
unsigned char Marks ; // use unsigned char for a non-negative value with limited range
Marks = 89 ;
|
Perhaps, this is what the career teacher expects; though there is no assignment here:
unsigned int Marks = 89 ;
Likewise for 2, use
unsigned long long for a non-negative value with large range
For smallest value that can be represented by an integer etc, see
std::numeric_limits<>
http://en.cppreference.com/w/cpp/types/numeric_limits
For example, the smallest value that can be represented by
int is
std::numeric_limits<int>::min()
and the largest finite value that can be represented by
double is
std::numeric_limits<double>::max()