4.Consider the given structure definitionstruct complex{int real;int imag;}; a. Write a C++ statement to create a stricture variable (Score 1) b. Write a C++ statement to store the value 15 to the structure member real.(Score 1) June 2019 5.Write the use & and * operators used in pointers.(score 2) June 2019 6.The ------ operator is used to allocate memory location during run time (execution).(score 1) March 2020 7.what is a pointer variable in C++ ? Write the syntax or example to declare a pointer variable.(score 2) March 2020 8.Write any two differences in static and dynamic memory allocation. (Score 2) March 2020
11.What is the difference between the declaration statements given below: ( a ) int * ptr = new int ( 10 ) ; ( b ) int * ptr = new int [10 ] ; (Score 2) June 2018
12.What is a pointer in C++ ? Declare a pointer and initialize with the name of your country. (Score 3) June 2018
13. Identify and correct the errors in the following code fragment: struct { int regno ; Char name[20] ; float mark=100 ; }; (Score 2) March 2018
14. Read the following code Fragment: Int a[ ]= {5,10,15,25}; Int *p=a; Predict the output of the following statements: (a) cout<<*p; (b) cout<<*p+1; (c) cout<<*(p+1); (Score 3) March 2018