Tag: programming languages
Questions Related to programming languages
-
It is just a fancy keyword, No purpose here
-
Prevents the compiler from assigning the function as an rvalue
-
Prevents the compiler from assigning the function as an lvalue
-
It makes sure that the return value is a const and is not changed by anyone else
-
Nothing is wrong. You are wrong.
-
Loops are not allowed inside the function scope, Since it degrades performance
-
My friend tried to return a pointer to a local function variable , which is invalid once the function call compltes.
-
The value i is not properly initialised, SO it may contain some garbage .
-
const int* ptr
-
const* int ptr
-
There is no such declaration like that
-
const int* const ptr
-
vp=&f;
-
c=(char*)&i;
-
c=vp;
-
*i++;
-
f++;
-
They tell the C++ compiler that they are functions compiled by a C compiler , So that they can be used in C++
-
they mean that the function are declared somewhere and defined somewhere
-
They improve performance
-
They are used with extern variables.
-
The point3d is represented as struct . change it to a class and it will run better
-
The point3d struct is not byte aligned.
-
The in the function point3d struct parameters are passed by value, Which will cause additional overhead.
-
The point3d struct has 3 members of type int . Change it to short ,the program will run faster.
-
3,7
-
3,5,7
-
index Outofbound exception
-
Compilation fails
-
3,7
-
3,5,7
-
index Outofbound exception
-
Compilation fails
-
B
-
A
-
Compilation fails
-
none of these