NPTEL | Week 0 | Assignment 0 | Programming in Java | Answer Sheet
Answer Sheet
NPTEL
Week 0 | Assignment 0
Total Questions : 15
Question 1: In C Programming what is the use of the `%d` format specifier in the `printf()` function?
- Print Double type value
- Print Integer type value
- Print character type value
- Print string type value
Answer: B
Hint: "In C programming, the %d
format specifier in the printf
function is used to print integer type values."
Question 2: Consider the Following code and answer the question.
int a[8] = {3,1,0,5,2,7,6,4};
}
What is the value of a[a[a[3]]]? Select your correct answer from the following options?
- Program is with compile-time error.
- program is with run-time error
- NULL
- 4
Answer: D
Hint: a[3] = 5 , a[5]=7, a[7]=4 | a[a[a[3]]] => a[a[5]] => a[7]
What's Your Reaction?






