301 Posted Topics

Member Avatar for nitin1

#include<stdio.h> main() { int a=258; int *num=&a; printf("%d %d",*((char *)num),*((char *)num+1)); } does the output depends on little endian or big endian structure of machine on which i am running this ? thanks.

Member Avatar for nitin1
0
147
Member Avatar for nitin1

code 1: #include<stdio.h> int main(void) { int a; a= 1,2,3; int b = a++; printf("%d",b); return 0; } code 2 : #include<stdio.h> int main(void) { int a; a= (1,2,3); int b = a++; printf("%d",b); return 0; } Can you please explain why that bracket is making ouput changed ? i …

Member Avatar for pooh1234qwerty
0
138
Member Avatar for nitin1

Wouldn't it be nice if we have a notification system ? I mean i will get notifications of only those threads on which i have replied at least once or the threads which are started by me ? It is going to help me alot if i have a beep …

Member Avatar for Dani
0
200
Member Avatar for nitin1

i know how numerical values are represented in memory. like +3, -3, 0, 1 , 3321 and like this. can you tell me how float, double are represented in memory ? like 3.220, -9876.87 ? i mean how bits are presented in memory ? like for singed number 32th bit …

Member Avatar for rubberman
0
205
Member Avatar for Aadhya169

I will tell u my journey. arranged from first book i have read till the last book i read from top to bottom. 1. sumita arora , C++ 2. Yashwant kantekkar , C basics 3. C, Balagurusamy 4. dennis Ricthie, C 5. test ur C skills,, C & C++ both …

Member Avatar for whitech
-1
298
Member Avatar for deceptikon

@deceptikon sir, you and that too in an interview ? :-o what is the result now ? yoo! am damn excited to know. ^_^. sir, i wana clearify that undefined and implementaion dependent, both are not defined by C standard ? secondly, i have read somewhere that malloc may use …

Member Avatar for deceptikon
5
224
Member Avatar for nitin1

actually, i deleted my one account on daniweb some time back, but i wana look at the posts ,whatever i have asked, comments by experts here and everything. i know i can see the posts, but i have to go very far away from today so as to look each …

Member Avatar for happygeek
0
790
Member Avatar for nitin1

int m= i++ || ++j && k--; where i=2, j=3, amd k=5; acooridng to me, it will be executed left to right and then values of m=1, i=3, j=3 and k=5. but i have seen that precednace of && is more than || , than so how this expression is …

Member Avatar for Banfa
0
311
Member Avatar for nitin1

#include<stdio.h> void f(int n) { char pp[n]; printf("%d\n",sizeof(pp)); } int main() { int n; scanf("%d",&n); f(n); } In this program the size of array is defined at runtime,and sizeof operator is printing correct size after runtime initialisation in gcc 4.4. Can anybody explain? we say that sizeof is compile time …

Member Avatar for sepp2k
0
188
Member Avatar for dxprogrammer
Member Avatar for nitin1

http://www.time4education.com/#login-box this is the link and when i click login box, nothing happens, when i give this to my friiend, then he is able to have a login box opened. please i have to register and please tell how to open this link ? thanks.

Member Avatar for diafol
0
291
Member Avatar for nitin1

a linked list is given, and a only pointer to a node is given which need to be deleted. it is singly linked list. you dnt have accees to any other pointer like head or what. you only have that node pointer in ur hand. thanks.

Member Avatar for deceptikon
-1
139
Member Avatar for nitin1

i have thought a lot on this. but not getting O(n) solution. given n URL's and you have to find the unique URL in that (if there is any). you have to print that URL. thanks. O(n2) solution is a stupid solution, some O(n) is acheivable, but not getting how …

Member Avatar for deceptikon
0
127
Member Avatar for nitin1

although, i have read C++ books in my past, but as my placement session is there, i just want to have some books from where i can see everything in shortest and concise possible. classes, polymorphism, inheritnce concepts etc like this . any book which u can tell me ? …

Member Avatar for dexblack_1
0
186
Member Avatar for nitin1

int a[]={1,3,4,5,7}; int b[]={2,3,5,6}; int m=sizeof(a)/sizeof(int); int n=sizeof(b)/sizeof(int); cout<<m<<" "<<n<<endl; this code prints 5,4. but when i pass the arrays to some function and then i print the m,n values then it is printing 1,1. i know that they are acting as pointer when i pass then in function and …

Member Avatar for Banfa
0
119
Member Avatar for nitin1

can anyone give me some good references or links or some guidelines to start with this ? i need to learn this. like i want to know how can i implement malloc, calloc, realloc etc. for this thing also, what do i need to learn firstly ? thanks. any kind …

Member Avatar for Ancient Dragon
0
146
Member Avatar for nitin1

can anyone explain me the all precison and exponent, significant bits which double can handle ? i am not getting it. wiki says it has 53 bits significant bits and 11 exponent. am a little bit confused. can anyone explain me ? (in their own way) thanks alot. although i …

Member Avatar for jephthah
0
165
Member Avatar for nitin1

can you tell me the approach that i have k*n nodes where k,n are integers and no two adjacent nodes can have same colours and i want to colour the trees with n colours. (i am making trees not graphs.) thanks. any help will be appreciated.

Member Avatar for nitin1
0
71
Member Avatar for nitin1

actually, I am trying to do digital watermarking. can you please giv me some hints of algos which i can use to do watermaking on numbers ? like i have array of numbers, then i want to water mark them with some kind of algo and also want to save …

Member Avatar for gusano79
0
108
Member Avatar for nitin1

quora.com and github.com, i am unable to open only these 2 sites from 10 days. can you please tell what is this and how can i rectify it ? please tell... thanks. :-)

Member Avatar for nitin1
0
70
Member Avatar for nitin1

why do we say science is develeped so much and it can do anything today if it wants. why dont we have treatement for kidney failure ? only dialysis ? which eats up and demolish a person's bones on per day basis. it is a silient killer. only kidney transplant …

Member Avatar for TonyG_cyprus
0
441
Member Avatar for nitin1

i want to do topo sort but i want to output the lexographically smallest topo sort vesion of that. http://www.spoj.com/problems/TOPOSORT/ here goes the link of problem. actually, i have done this using DFS , but i am able to do the question "print any possible topo sort" of the graph. …

Member Avatar for cproger
0
261
Member Avatar for srivardhanms

@deceptikon when i use extern int i; and it is also present in other file, then after that i can use it normally ? right ? like x=10 or int x=10 ? i think after declaring i just need to use x=10 only as i have already specified that it …

Member Avatar for srivardhanms
0
1K
Member Avatar for nitin1

If you consider any multiple of 3 and then sum up its digits, the sum is always divisible by 3. For eg. 843 is a multiple of 3 and 8 + 4 + 3 = 15 is also multiple of 3. Similarly, for 9, any multiple of 9 satisfies the …

Member Avatar for tinstaafl
0
95
Member Avatar for nitin1

#include<iostream> #include<string> #include<vector> #include<algorithm> #include <cstdlib> using namespace std; int main() { char s[5]; string g; int p=345; sprintf(s,"%d",345); g=s; g+=".mp3"; cout<<g<<endl; getchar(); return 0; } I have a very small doubt about strings. this is code snippet i have shown. when i have called sprintf(), then it has changed …

Member Avatar for Moschops
0
162
Member Avatar for nitin1

#include<iostream> #include <cstdio> #include<string> using namespace std; typedef struct node node; struct node { int value; node * child[26]; }*root; node * newnode() { node * nn; nn=(node*)malloc(sizeof(node)); nn->value=0; for(int i=0;i<26;i++) { nn->child[i]=NULL; } return nn; } bool insert(string s) { node * temp=root; bool xx=false; for(int level=0;level<s.length();level++) { int …

Member Avatar for deceptikon
0
129
Member Avatar for nitin1

the extent of knowledge which people on daniweb has is incredible. they are GOd of thier subjects. it is a boon to me by god when i came across the daniweb. :-) thanks to all of you. :-)

Member Avatar for BigPaw
3
223
Member Avatar for nitin1

can anyone please explain me in brief that how exactly this container work ? or can u giveme some link of this. i have tried to look on some links by google, but i am not much clear about my doubt. please help me if u can. thanks.

Member Avatar for mike_2000_17
0
423
Member Avatar for nitin1
Member Avatar for nitin1

i am learning C++ from a good time now.. but I am still very confused sometimes in the use of array(char) and string.. can anyone please tell me that what exactly all differences between string and char array ? what can i do with array which i can't do with …

Member Avatar for Lucaci Andrew
0
211
Member Avatar for nitin1

i have a undirected graph and i want to print a cycle with length >=k (given) , can you suggest me a algo ? i dont want any code, snippet. i am hoping for hint and algo for this. thanks. it is guaratned that cycle of length >=k exists.. thanks.

Member Avatar for Taywin
0
141
Member Avatar for nitin1

i want to practise blood relations problems, venn diagrams, series, analogies, puzzle test, decsion making and topics resembling to them. can you suggest me a good book for these topics. they are covered under logical reasoning. please suggest the good book which you have come acrossed. thanks.

Member Avatar for aditd
0
157
Member Avatar for nitin1

actually, I am new to C++ , although not new to programming. i have a vector of pairs , vector<pair<double, pair<int,int> >> and i want to sort it in incresing order. for simplicity, i am using sort() inbulit function. does pair has ibuilt '<' operator ? or we have to …

Member Avatar for vijayan121
0
125
Member Avatar for nitin1

it is really awesome. actually i have given this idea :p and i have some credit in adding this feature to daniweb. (just kidding). in reality, programmers are really great who are behind all these things and whole crdit goes to them. hats off.. P.S who is the programmer who …

Member Avatar for <M/>
0
397
Member Avatar for nitin1

can anyone please help me in the sort function ? i have read that there are 3 way to use sort(). 1. use sort(v.begin(),v.end()) and second is sort(v.begin(),v.begin()+n, cmp) then in cmp i can have 2 varaitions, 2.a : cmp as the function (it is okay with me) 2.b. here …

Member Avatar for NathanOliver
0
225
Member Avatar for nitin1

i have an array of strings (2D array). i am taking input of strings and that strings can be same with strings which i have inputted before that string. so i want that i don't enter that string which is already being taken into array. so how can i do …

Member Avatar for deceptikon
0
131
Member Avatar for nitin1

#include<iostream> #include<algorithm> using namespace std; #define MAX 10000000 #include<stdlib.h> #include<string.h> char s[MAX]; int p[MAX]; int bucket[MAX],nbucket[MAX]; struct suffix { int idx; }pos[MAX]; int H=0; bool cmp(struct suffix i,struct suffix j) { if(H==0) { return s[i.idx]<s[j.idx]; } else { if(bucket[i.idx]==bucket[j.idx]) { return bucket[i.idx+H]<bucket[j.idx+H]; } else { return bucket[i.idx]<bucket[j.idx]; } } } …

Member Avatar for deceptikon
0
618
Member Avatar for nitin1

yesterday, my RAM crashed. that was of 1 GB and now i wana purchase new one. I am thinking to buy 2 GB RAM. specifications for PC : model- HP pavellion model age: 4+ years RAM: 1 GB(initially) Processor: intel core 2DUO Hard disk: around 600 GB operating systems: Window …

Member Avatar for webjack
0
197
Member Avatar for nitin1

how can i remove my given code snippet i have submitted ? i dont want any more negative votes to my code. thanks

Member Avatar for deceptikon
0
195
Member Avatar for nitin1

Android Launch! [2012-12-14 21:55:11 - myfirstapp] adb is running normally. [2012-12-14 21:55:11 - myfirstapp] Performing com.example.myfirstapp.MainActivity activity launch [2012-12-14 21:55:11 - myfirstapp] Automatic Target Mode: launching new emulator with compatible AVD 'myfirstavd' [2012-12-14 21:55:11 - myfirstapp] Launching a new emulator with Virtual Device 'myfirstavd' [2012-12-14 21:55:16 - Emulator] Failed to …

Member Avatar for nitin1
0
151
Member Avatar for nitin1

daniweb should have a LCD looking button which will be off when that person is not online otherwise green. i have seen on many maths forumns. it is sometimes nice and helpful. we can have this feature if possible :-)

Member Avatar for Sahil89
0
377
Member Avatar for nitin1

actually, i am not asking for fun or something. I want to learn something new in these vacations. I know C, Java and moderate knowledge of php. Can you tell me something which i can learn in the vacations ? I have 1 month as vacations and ample time to …

Member Avatar for nitin1
0
526
Member Avatar for nitin1
Member Avatar for Vish0203

hey, Can i please ask that what are you doing in this code ? looking interesting to me(as i suspect something related to window applications.)

Member Avatar for Ancient Dragon
0
4K
Member Avatar for mrnutty

11 ? 2 cases. either i am in future or you are in past. :-O so what's the case here ? wow... Time machine..

Member Avatar for mrnutty
0
240
Member Avatar for nitin1

if i want an array of 10000 ints and i just nned to use it like array only (not the functions which vector have seprately from array), then i make an array int a[10000] and vector<int>a(10000); then memory allocation time will be different for them ? if yes, then please …

Member Avatar for ravenous
0
144
Member Avatar for futureeconomist
Member Avatar for deepecstasy

hey! i will advice you one thing here. Just read once CLRS topic AVL trees. the explaination which they have given is blossom! believe me. seen you code a little bit and seen some logical error. have made full AVL tree in last semester. just read once and you will …

Member Avatar for nitin1
-1
181
Member Avatar for nitin1

#include<stdio.h> #include<conio.h> int main() { long double p=778.567; printf("%Lf",p); getch(); return 0; } it's output is : -115403.... something... why is it so ?

Member Avatar for nitin1
0
143
Member Avatar for ulrik m.

sir, if i want to print double then i have to use "%f" and when i need to input a double, then "%lf" ? is it what u said ? but i always use %f and it works fine for both cases. please clearify.

Member Avatar for nitin1
0
307

The End.