What would be the result of compiling and executing this C?
/* The meaning of life is:
printf("%d\n", 6*7);
What would be the result of compiling and executing this C?
answer = 42;
printf("%d\n", answer);
What would be the result of compiling and executing this C?
int x, y;
x = 15;
y = x;
x = 27;
printf("%d\n", y);
What would be the result of compiling and executing this C?
int x;
x = "hello world";
printf("%d\n", x);
What would be the result of compiling and executing this C?
int x;
x = 42;
printf("%d\n", X);
% a.out Enter first number: 6 Enter second number: 7 The product of 6 and 7 is 42
I must not talk during lectures.
Write C statements to do the same task, i.e.
compute the sum of integer values from n to
Assume that the values n and
1
1 2
1 2 3
1 2 3 4
.....
1 2 3 4 .... n
The first few tetrahedral numbers are:
1, 4, 10, 20, 35
Write C statements which print the first 100 tetrahedral numbers.