Answer:
hope this helps. I am also a learner like you. Please cross check my explanation.
Explanation:
#include
#include
using namespace std;
int main()
{
int a[ ] = {0, 0, 0}; //array declared initializing a0=0, a1=0, a3=0
int* p = &a[1]; //pointer p is initialized it will be holding the address of a1 which means when p will be called it will point to whatever is present at the address a1, right now it hold 0.
int* q = &a[0]; //pointer q is initialized it will be holding the address of a0 which means when q will be called it will point to whatever is present at the address a0, right now it hold 0.
q=p; // now q is also pointing towards what p is pointing both holds the same address that is &a[1]
*q=1
; //&a[0] gets overwritten and now pointer q has integer 1......i am not sure abut this one
p = a; //p is now holding address of complete array a
*p=1; // a gets overwritten and now pointer q has integer 1......i am not sure abut this one
int*& r = p; //not sure
int** s = &q; s is a double pointer means it has more capacity of storage than single pointer and is now holding address of q
r = *s + 1; //not sure
s= &r; //explained above
**s = 1; //explained above
return 0;
}
Answer:
num
Explanation:
In java reserved words are also known as keywords, keywords are reserve words for a language that can't be used as an identifier(name of a class, name of a variable, name of an array etc.) int, public static, are reserve words.
In given question num is not a reserved word.
Answer:
I first saw the Polaroid SX-70—the one-step instant camera introduced in 1972 by the company's co-founder, Dr.
Explanation:
In this program, I am using the school-based grading system and the program should accept the subject and the number of students.
Program approach:-
- Using the necessary header file.
- Using the standard I/O namespace function.
- Define the main function.
- Declare the variable.
- Display enter obtain marks in 5 subjects.
- Return the value.
Program:-
//header file
#include<iostream>
//using namespace
using namespace std;
//main method
int main()
{
//declare variable
int j;
float mark, sum=0, a;
//display enter obtain marks in 5 subjects
cout<<"Enter Marks obtained in 5 Subjects: ";
for(j=0; j<5; j++)
{
cin>>mark;
sum = sum+mark;
}
a = sum/5;
//display grade
cout<<"\nGrade = ";
if(a>=91 && a<=100)
//display a1
cout<<"a1";
else if(a>=81 && a<91)
//display a2
cout<<"a2";
else if(a>=71 && a<81)
cout<<"b1";
else if(a>=61 && a<71)
cout<<"b2";
else if(a>=51 && a<61)
//display c1
cout<<"c1";
else if(a>=41 && a<51)
//display c2
cout<<"c2";
else if(a>=33 && a<41)
//display d
cout<<"d";
else if(a>=21 && a<33)
//display e1
cout<<"e1";
else if(a>=0 && a<21)
//display e2
cout<<"e2";
else
//display invalid
cout<<"Invalid!";
cout<<endl;
//return the value
return 0;
}
Learn more grading system
brainly.com/question/24298916