@ankit , wat is '%' in scanf and printf.. statemetns??
1. char ch;
cin.get(ch).get(ch);//How this statement is valid??-2 get() func.
2."this" pointer, random()function // Is it there in the CBSE syllabus
3.pls. illustrate (pls give eg.)scanf and printf statements(especially
for outputs)
4.Give output-
void main()
{
int x[]={10,20,30,40,50};
int *p, **q, *t;
p=x;
t=x+1;
q=&t;
cout<<*p<<","<<**q<<","<<*t++;
}
5. How to detect end of file without using eof() function.
6.Give the ouput and explain
#include<iostream.h>
void main()
{
int a =32, *ptr=&a;
char ch='A' , &cho=ch;
cho+=a; *ptr+=ch;
cout<<a<<" "<<ch<<endl;
}
7.Convert the infix expression:
A-B+C*D^E*G/H into postfix expression. Evaluate the postfix expresstion showinf the status of stack at every step given
A=5, B=2,C=4,D=2,E=1,G=6,H=5;
//Atleast explain the use of exponential operator here..
8.Why Insertion sort is more efficient than other sorts?
-
UP 0 DOWN 0 0 42
42 Answers
this question too..
a[ 5]={7,19,8,12,13};
int *p;
p=a;
cout<<*++p<<++*p<<*p++;
actually i want to ask:
*p++ = (*p)++ or *(p++)
sriyou are right.. i missed that one in hadbadi
It willbe 30 because the pointer value will increase by 1 :)
In insertion sort the no of comparisions done is much lesser than selection sort
bubble sort takes max time because of max comparisions
In finding SOP using K-maps...I paired two ones as shown in the LHS pic, but in marking scheme the pattern was as on RHS pic(OTHER pairing and grouping 4 ones are same except this ), so there exists 2 diff ans.. which is correct??