Is there any difference between dlearations int* x and int
*x? If so tell me the difference?
Answer Posted / reejusri
There is no diffrence between int* x and int *x.
but difference will come into picture when you use:
Case 1:
int* x,y,z;
and
Case2:
int *x,y,z;
in first case x,y and z are integer pointer, where as
un second case only x is integer pointer rest y and z is
integer. So its always a good practice not to put multiple
variable in single line.
Is This Answer Correct ? | 4 Yes | 23 No |
Post New Answer View All Answers
What is the use of main function in c++?
How do you sort a sort function in c++ to sort in descending order?
What are the advantages of c++ over c?
Write a program in C++ for Fibonacci series
Is c++ the best programming language?
Explain dangling pointer.
What is the difference between the functions memmove() and memcpy()?
What is auto used for in c++?
Evaluate !(1&&1||1&&0) a) Error b) False c) True
There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.
Can char be a number c++?
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?
What can c++ be used for?
What is nested class in c++?