Discussion Forum : Arrays
Question -

What is the output of this program?

#include < stdio.h >

using namespace std;

int main()

{

int array[] = {10, 20, 30};

cout

Options:
A .  -15
B .  -30
C .  compile time error
D .  garbage value
Answer: Option B


It's just printing the negative value of the concern element.



Was this answer helpful ?
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *