1): when we specify the buffer size, normally the operating system or compiler does this for us. A typical size of buffer is 512 bytes. When the information is of 512 byte size, output will take place. But in the program, we may want at some point that whatever is in the buffer, show them. For that purpose the normal mechanism is flush. Flush the stream.
--
<IMRAN>
-- The flush command forces the data from the buffer to go to its destination which is
normally a screen or file and make the buffer empty. Lec 34
2):
a template is a sketch to draw some shape or figure.
There are two different types of templates in C++ language i.e.' function templates
and class templates. Lec 41
3) I dont know
On Mon, Mar 1, 2010 at 1:24 PM, mc090405731 Safeera Nawaz <mc090405731@vu.edu.pk> wrote:
please any one send me short answer of these questions:
1st...what is the function of flush commond?
2nd...what are the types of templates?
3rd....it is possible to define two functionas given below
func(intx,inty)
func(int&x,int&y)
On 3/1/10, عمران شہزا د <mc090400760@vu.edu.pk> wrote:
> The MCQs from CS201 are as under. Please check them which i solved and
> give the answers which i could not solve.
>
>
>
> In C/C++ the string constant is enclosed
> ► In curly braces
> ► In small braces
> ► In single quotes
> ► In double quotes
>
>
> The size of int data type is
> ► 1 bytes
> ► 2 bytes
> ► 3 bytes
> ►* 4 bytes*
>
>
> In Flow chart process is represented by
> ►* Rectangle*
> ► Arrow symbol
> ► Oval
> ► Circle
>
>
> If the break statement is missed in switch statement then,
> ► The compiler will give error
> ► This may cause a logical error
> ► No effect on program
> ► Program stops its execution
>
>
> When we are using const keyword with a variable x then initializing it at
> the time of declaration is,
> ► *Must*
> ► Optional
> ► Not necessary
> ► A syntax error
>
>
> Which of the following is the correct way to assign an integer value 5 to
> element of a matrix say 'm' at second row and third column?
> ►* m[2][3] = 5 ;*
> ► m[3][2] = 5 ;
> ► m[1][2] = 5 ;
> ► m[2][3] = '5';
>
>
> How many total elements must be in two-dimensional array of 3 rows and 2
> columns?
> ► 4
> ► 5
> ►* 6*
> ► 7
>
>
> Which of the following is the correct statement for the following
> declaration?
> const int *ptr.
> ► ptr is a constant pointer
> ►ptr is constant integer pointer
> ►*ptr is a constant pointer to int*
> ►ptr is a pointer to const int
>
>
> Consider the following code segment. What will be the output of this code
> segment?
> int arr[6] = {2, 3, 7, 4, 5, 6} ;
> int *ptr1 =&arr[1] ;
> int *ptr2 = &arr[4] ;
> cout << (ptr2-ptr1) ;
> ► 3
> ► 9
> ► 12
> ►* 2*
>
>
> What will be the correct syntax to assign an array named arr of 5 elements
> to a pointer ptr?
> ► *ptr = arr ;
> ►ptr = arr ;
> ►**ptr = arr[5] *;
> ►ptr = arr[5] ;
>
>
> The variables having a name, type and size are just like empty boxes.
> ►*False*
> ►True
>
>
> What's wrong with this for loop?
> for (int k = 2, k <=12, k++)
> ► the increment should always be ++k
> ►* the variable must always be the letter i when using a for loop*
> ► there should be a semicolon at the end of the statement
> ► the commas should be semicolons
>
>
> Most efficient method of dealing with structure variables is to define the
> structure globally
> ► True
> ►False
>
>
> Syntax of union is identical to ______
> ► *Structure*
> ► Class
> ► Function
> ► None of the given options
>
>
>
> *Question:* Suppose 'z' is a variable of type int. What will be the result
> of x = 27/4:
>
>
> *Question: *Give the general syntax of definition of structure.
>
> *Ans: *
> * *struct_structure name{
> data type_array name[];
> data type_array name[];
>
> data type_array name[];
> };
>
>
>
> *Questions: *
> **Consider the structure
>
> struct Customer
> {
> int custnum;
> int salary;
> float commission;
> };
> A programmer wants to assign 2000 for the structure member salary in the
> above example of structure Customer with structure variable cust1
> What line of code should he write?
>
>
>
> --
>
> <IMRAN>
> MCS
>
> --
> Please visit www.vuaskari.com, get registered for old papers, quiz,
> assignments and GDBs...
> You received this message because you are subscribed to the Google
> Groups "VU_askari" group.
> To post to this group, send email to vu_askari@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/vu_askari?hl=en?hl=en
> Or contact Admin of the group askarihelpline@gmail.com or
> askarimithelpline@gmail.com for any problems/ suggestions/ complaints.
>
--
Please visit www.vuaskari.com, get registered for old papers, quiz, assignments and GDBs...
You received this message because you are subscribed to the Google
Groups "VU_askari" group.
To post to this group, send email to vu_askari@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/vu_askari?hl=en?hl=en
Or contact Admin of the group askarihelpline@gmail.com or askarimithelpline@gmail.com for any problems/ suggestions/ complaints.
--
<IMRAN>
Please visit www.vuaskari.com, get registered for old papers, quiz, assignments and GDBs...
You received this message because you are subscribed to the Google
Groups "VU_askari" group.
To post to this group, send email to vu_askari@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/vu_askari?hl=en?hl=en
Or contact Admin of the group askarihelpline@gmail.com or askarimithelpline@gmail.com for any problems/ suggestions/ complaints.
No comments:
Post a Comment