Concept explainers
Explanation of Solution
valid – address of int variable assigned to int pointer.
valid – arithmetic operation among int variable and int variable pointed to by int pointer (using dereferencing operator *), the result being assigned to a third int variable.
invalid – double pointer cannot be assigned an int pointer as the types don’t match.
valid – the memory location pointed to by a double pointer (using the dereferencing operation *) can be stored with an int value.
valid - the memory location pointed to by a double pointer (using the dereferencing operation *) can be stored with an int value pointed to by an int pointer (using the dereferencing operation *).
invalid – an int variable cannot be assigned an int pointer variable...
valid – address of int variable assigned to int pointer.
valid – arithmetic operation among int variable and int variable pointed to by int pointer (using dereferencing operator *), the result being assigned to a third int variable.
invalid – double pointer cannot be assigned an int pointer as the types don’t match.
valid – the memory location pointed to by a double pointer (using the dereferencing operation *) can be stored with an int value.
valid - the memory location pointed to by a double pointer (using the dereferencing operation *) can be stored with an int value pointed to by an int pointer (using the dereferencing operation *).
invalid – an int variable cannot be assigned an int pointer variable...
Want to see the full answer?
Check out a sample textbook solutionChapter 12 Solutions
C Programming: From Problem Analysis to Program Design
- do q3 Question No 1: Create the following structures in C: Student : Name RegId Enrolled courses (Labs + Theory) Department Semester Faculty: Name Department Designation Salary: Implement the following scenario using functions: setMarks():This function will allow faculty member to set Student marks. getGpa(): Takes student as an argument and calculates the student’s GPA. displayStudent(): display the given student’s information. displayFaculty(): display the given faculty’s information. Question No 3: Refer to Question NO 01 Student structure and using pointer determine the senior student among two students. Print information of the senior student.arrow_forward1. Mark the following statements as true or false. a. An identifier must start with a letter and can be any sequence of characters. (1) b. In C++, there is no difference between a reserved word and a predefined identifier. (1) c. A C++ identifier cannot start with a digit. (1) d. The collating sequence of a character is its preset number in the character data set. (2) e. Only one of the operands of the modulus operator needs to be of type int. (3) f. If ; and ;, then after the statement ; the value of b is erased. (6) g. If the input is 7 and x is a variable of type int, then the statement ; assigns the value 7 to x. (6) h. In an output statement, the newline character may be a part of the string. (10) i. In C++, all variables must be initialized when they are declared. (7) j. In a mixed expression, all the operands are converted to floating-point numbers. (4) k. Suppose . After the statement ; executes, y is 5 and x is 6. (9) i. Suppose . After the statement ; executes, the value of a is still 5 because the value of the expression is not saved in another variable. (9)arrow_forwardExplain the differences between value type and reference type.arrow_forward
- Write in C++ Language. (Mini Library): Create a structure containing book information Data members:• serial number• writer name• title of book• flag (issued/not issued). Member Functions:Create a menu in which the following can be done. 1 – Display information of book 2 - Add a new book 3 - Display all the books of a specific writer 4 - Display the number of books of a specific title 5 - Display the total number of books in the library 6 - Issue a book(If we issue a book, then its number gets decreased by 1 and if we add a book, its number gets increased by 1)arrow_forwardWrite the statements of C++ that call the function display to output the contents of the arrays of salary and students. a:int salary[20][7]; b:int students[30][7];arrow_forwardPlease show how it was code in C language.arrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning