Answer:
Long integer literal.
Explanation:
Integer literal can be defined as numbers that do not contain any decimal point or augmented part. An integer literals can be characterized as decimal, octal, or hexadecimal constant. When an integer liteal is added with prefix it tends to define its base, whereas suffix define its type.
The suffix L to an integer literal means long integer literal. The suffix can be written in any form, either upper case (L) or lower case (l).
Therefore, the correct answer is long integer literal.
Please provide photos for your question.
Answer:
# include <conio.h>
# include <iostream.h>
using namespace std;
main{
int a[25], sum;
cout<<"enter the values in array a";
for (int i=0; i<= 24 ; i++)
{
cin>>a[i];
}
sum =0;
for (int j=0; j<=24 ; j++)
{
sum= sum + a[j];
}
cout<< sum;
getch ();
}
Answer:
Option d is the correct answer for the above question.
Explanation:
- The first loop of the program has a second loop and then the statement. In this scenario, the second loop executes for the value of the first loop and the statement executes for the value of the second loop.
- The first loop executes 4 times, Then the second loop or inner loop executes n times for the n iteration of the first loop, for example, 1 time for the first iteration of the first loop, 2 times for the second iteration of the first loop and so on.
- Then the inner loop executes (1+2+3+4) iteration which gives the result 10 iterations.
- The sum initial value is 0 and the "sum++", increase the value of the sum by 1.
- So the value of the sum becomes 10 after completing 10 iterations of the inner for loop.
- Hence the 10 will be the output. So the Option d is the correct answer while the other is not.