Question: 1 ) Consider the code snippet below. int c h ; ch = 1 0 0 ; int * ptr = &ch; Which of the

1)Consider the code snippet below.
int ch;
ch =100;
int* ptr = &ch;
Which of the following statements represents a legal way of obtaining the value
that ptr points to?
a ptr
b *ptr
c &ptr
d *(&ptr)
2)To receive command line arguments at run-time, which of the following options
represents the correct way to define the main function?
a int main(int* argc, char argv)
b int main(int argc[], char* argv)
c int main(int argc, char argv[])
d int main(int argc, char* argv[])
3)What is the purpose of a main () program accepting command line arguments?
a So the program can be run from a batch file without user input
b To supply values that vary at run time
c So the program can know the name under which it was invoked
d All of these
4)Considering that you want to open a binary file for reading and writing, which of the
following commands should you use?
a strm.open(filename, ios::in | ios::out);
b strm.open(filenameios::binary);
c strm.open(filename);
d strm.open(filename, ios::in | ios::out | ios::binary);
 1)Consider the code snippet below. int ch; ch =100; int* ptr

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!