Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~3K People Reached
Favorite Tags

8 Posted Topics

Member Avatar for surfingturtle

Please expound on get() function mentioned in the following code.....am not able to understand the output of this program. #include "stdafx.h" #include <iostream> using namespace std; int main() { char ch; cout<<endl<<"Enter a character:"; cin.get(ch); cout<<ch; cin.putback(ch); cin.get(ch); cout<<endl<<ch; int count=cin.gcount(); cout<<endl<<"Characters extracted in last get()= "<<count; //stuff stream with …

Member Avatar for surfingturtle
0
163
Member Avatar for surfingturtle

#include <iostream> #include <cstdlib> #include <new> using namespace std; void memwarning(); void* operator new(size_t, int); void operator delete(void*); int main() { char*p = new('$')char[100]; //Query 4b cout<<endl<<"First allocation: p = " <<hex<<long(p)<<endl; // Query 1 for(int i=0;i<100;i++) cout<<p[i]; cout<<endl; delete p;// Query 2 p=new('*')char[64000u]; // Query 3 delete p; return …

Member Avatar for surfingturtle
0
248
Member Avatar for surfingturtle

Dear members, Am learning C++ by Yashawant Kanetkar from his book "Let us C++", its been said his books are good for beginners who do self study like me, but I find some conflict of logic in this book, please help me clear those... The book says......the following code fragment …

Member Avatar for David W
0
271
Member Avatar for surfingturtle

/* Am not able to understand the operation happening in function showbits(), please help*/ #include <stdio.h> void showbits (unsigned char); int main() { unsigned char num=225,j,k; printf(\nDecimal %d is same as binary", num); showbits (num); for(j=0; j<=4; j++) { k=num<<j; printf (\n%d left shift %d gives", num, j); showbits(k); } …

Member Avatar for surfingturtle
0
200
Member Avatar for Learner010

precise and informative, hope you also know the way for getting two results back from a single function call.

Member Avatar for Learner010
2
877
Member Avatar for surfingturtle

Dear members, I thank you for taking time to view this discussion, which would focuss on how to build ones career in webpage designing, Kindly guide me from ground zero to start with, after doing some research I stumbled across Jon Duckett's book (HTML & CSS, Design and build website), …

Member Avatar for BibhutiAlmighty
0
457
Member Avatar for surfingturtle

Dear members please help me in understanding the control flow in the following code, thanks #include <iostream> class constructs #include <iostream> class constructs { char inp; public: void acceptCharacter() { cout<<"Enter a character: "; cin>>inp; if(inp>='A') //ASCII value of A = 65 if(intp<='Z') //ASCII value of Z = 90 cout<<endl<<"Uppercase"; …

Member Avatar for surfingturtle
0
315
Member Avatar for surfingturtle

#include <iostream> #include <conio.h> using namespace std; void TOH(int d, char tower1, char tower2, char tower3) { if(d==1) //base case { cout<<"\nShift top disk from tower"<<tower1<<"to tower"<<tower2; return; } TOH(d-1,tower1,tower3,tower2); //recursive function call cout<<"\nShift top disk from tower"<<tower1<<"to tower"<<tower2; TOH(d-1,tower3,tower2,tower1); //recursive function call } int main() { int disk; cout<<"Enter …

Member Avatar for surfingturtle
0
915

The End.