C Programming Tutorial 4 - Question
C Programming Tutorial 4 - Question
a) printf( "%d", i == 1 );
b) printf( "%d", j == 3 );
c) printf( "%d", i >= 1 && j < 4 );
d) printf( "%d", m < = 99 && k < m );
e) printf( "%d", j >= i || k == m );
f) printf( "%d", k + m < j || 3 - j >= k );
g) printf( "%d", !m );
h) printf( "%d", !( j - m ) );
i) printf( "%d", !( k > m ) );
2. Write statements that assign random integers to the variable n in the following ranges:
a) 1n2
b) 1 n 100
c) 0n9
d) 1000 n 1112
3. For each of the following sets of integers, write a single statement that will print a number at
random from the set.
a) 2, 4, 6, 8, 10.
b) 3, 5, 7, 9, 11.
age = 20;
printf (You are now %d, and will be %d in one year,
age, age++);