Hi...
I have a scenario in which i would put all my implementation functions as library.Say for eg : I have a list library
I have a function called Intialise() which returns a handle...
Type: Posts; User: dpp
Hi...
I have a scenario in which i would put all my implementation functions as library.Say for eg : I have a list library
I have a function called Intialise() which returns a handle...
If any good tutorials/videos/link on sparse matrix to represent graphs will be really helpfull.
for eg : how will the following graph be represented ...just to illustrate....
...
Is adjacency matrix representation and sparse matric representation the same?
Can i have Some simple , effective ,easy to implement hash algorithm
Can i get some good links /tutorials on tree rotation algorithms.
Not exactly for balancing the tree.I need it just to have a feel on rotations.
I have a scenario in which user types int,float or double.
i use void pointers and pass it to a function.
void get (void * elm)
{
---------------
Can we create a template in c.
we have this option in c++. eg: template for vector is created and vector of any data type can be used .various functions are performed on the vector.
Just need to...
I have designed a program which deals about stack and its functionalities...
Just an overview of the design of the code:
struct STACK{
int value;
struct STACK * next;
};
i would like to store an array of chars
eg:
ABC
DEF
Moreover my requirement is to use scanf
how do i store character array in vector
#include<iostream>
#include<queue>
#include<vector>
#include<string>
using namespace std;
int main()
{
char *s;
nope..what do i do if i need to check it explicitly..any suggestion/help??
when i use c++ string i won't be able to use
scanf()
USING SCANF:
when i need to check the end of input file i do it using scanf by the following approach:
while(scanf("%s",&s1)!=EOF)
{
void func(int * p) {
printf("%s\n", p < (int*)(&p) ? "GREAT" : "LESS");
}
how the address are compared?
This was a debugging question...I was puzzled with it... ;)
what if i need to print the diffrence in the address.. shud i store the address in a pointer variable and subtract it
int main()
{
int a[] ={ 1,2,3,4,5,6,7};
char c[] = {' a','x','h','o','k'};
printf("%d %d ",&a[0],&a[3]);//prints address with with the diffence of 12
printf("\n%d\t %d ",...
yeah ;) thanks
take for example:
#define MAN(x,y) (x)>(y)?(x):(y)
.............
int i=10,j=5,k=0;
k= MAN(i++,++j);
printf("%d %d %d",i,j,k);
i thought the answer would be: 11,6,10
but the answer is...
yes i know.but the answer is different from what we have in function...
The called number is not 5,4 basically
#define max(x,y) (x)>(y)?(x):(y)
.........
.............
.........
int a=5,b=3;
int k=max(a++,++b);
cout<<k;
...............
if it's gonna be a function the call is like:
Thanks for the reply...
I don't undesrtand the code with your explanation completely...
will u be patient enough to explain me in detail
Thousands of thanks ;)
S i do know the basics... but here in teh code pasted num value is divided by 2 at each iteration and reaches zero...(since right shift)
temp value multiplying all the time(since leftshift)
i don't...
I was searching for an algorithm to reverse the bits...
I found one and coded it in c++...will this work
#include<iostream>
using namespace std;
int main()
{
unsigned int num;
cin>>num; ...
i came across this to set the appropriate option bits bits dpeending on the input....
but some one explain me about hexamdecimal values dealt here ... and why they are dealt here.
A simple C...
I came across a snippet
#define OPTION1 "option1"
#define OPTION1_BITPOS (0x00000001)
#define OPTION2 "option2"
#define OPTION2_BITPOS (0x00000002)
#define OPTION3 "option3"
#define...
I mean something like this...
have anyone seen such questions before