| | |
I have a few questions to be patched up can anybody get these to me ?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2004
Posts: 4
Reputation:
Solved Threads: 0
What is the output of printf("%d")
What will happen if I say delete this
Difference between "vector" and "array"?
How to write a program such that it will delete itself after exectution?
Can we generate a C++ source code from the binary file?
What are inline functions?
Details about profiling?
Actually these questions were put to students by potential recruiters
Can ANYBODY help me on these
What will happen if I say delete this
Difference between "vector" and "array"?
How to write a program such that it will delete itself after exectution?
Can we generate a C++ source code from the binary file?
What are inline functions?
Details about profiling?
Actually these questions were put to students by potential recruiters
Can ANYBODY help me on these
•
•
Join Date: Feb 2008
Posts: 628
Reputation:
Solved Threads: 46
Here are some of the answers:
It will output some junk signed integer value because you never told it which signed integer to output.
A vector is a STL container that has the same functionality as an array, but you check the validity of an index using .at() and you can get the length with .size(). You can also use STL iterators to potentially convert a vector into a different STL container.
Sounds hard, if not impossible.
Functions that the compiler knows to optimize. I think most compiler usually figure out what to inline by themselves these days.
I use valgrind's cachegrind. Works really well/easily.
•
•
•
•
What is the output of printf("%d")
•
•
•
•
Difference between "vector" and "array"?
•
•
•
•
Can we generate a C++ source code from the binary file?
•
•
•
•
What are inline functions?
•
•
•
•
Details about profiling?
•
•
•
•
What are inline functions?
Functions that the compiler knows to optimize. I think most compiler usually figure out what to inline by themselves these days.
first of this terminology is very much used for functions in classes .
if a particular function is defined inside the class itself it becomes inline .
that is usually if a function is defined and called for the compiler navigates to the part where its defined and then executes the instruction . but if its an inline function the code which define the function as a whole is taken in , rather than navigating to it.
thus by speeding up the execution .
Note : inline functions have to be smaller (lesser lines of code) .its prudent not to make huge functions inline .
<?php
$data = $_POST['data'];
if(empty($data)) {
echo "byte me" ; }
?>
$data = $_POST['data'];
if(empty($data)) {
echo "byte me" ; }
?>
I would like to add something to the description of 'inline' functions:
-> The compiler is always replacing an inline function call with all the instructions in the function ...
-> That's why it's recommended to keep the number of lines in an inline function as short as possible ...
-> The compiler is always replacing an inline function call with all the instructions in the function ...
-> That's why it's recommended to keep the number of lines in an inline function as short as possible ...
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
We only close threads when it violates one or more of the DaniWeb rules. Its perfectly acceptable to post in old threads as long as the new posts are on-topic and contain relevant information.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- Tutorials & Code Submissions - Questions? (DaniWeb Community Feedback)
Other Threads in the C++ Forum
- Previous Thread: Get memory usage
- Next Thread: C++ Convert Jumble word to Real possible words
| Thread Tools | Search this Thread |
api array based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock wordfrequency wxwidgets






