301 Posted Topics
Re: haha.. yey!! party time. congo bongo songo songs must be there now. yipee!! yo yo yo!! enjoy!! party hard.. ;) | |
Like in India and many other countries, value of their currency is going down and down. What can be the possible reasons for this ? I am not a economics student, still want to know what exactly is there behind the screen ? thanks. ;) | |
Re: here, you are assigning 75 to b. Then, you are adding 9 to 75(b ,actually) and assigning this value to a. So , as the result of it, you have a= 84 and b as 75 which will be printed in the 5th line in the code snippet. hope it … | |
int a=3; cout<<a++<<" "<<++a; what is the expected output of this problem ? It is undefined behaviour as it is updating value of "a" once more than once in a sequence point ? Correct me if i am wrong at any point. thanks if you can help me. | |
Re: #include<stdio.h> #include<conio.h> int main() { int a,b=2,c,n; printf("enter n"); scanf("%d",&n); for(a=2;a<=n;a++) { b=2; c=1; while(b<a) { if(a%b==0) { c=0; break; } b++; } if(c!=0) { printf("\n%d",a); } } getch(); } Firstly, start using a better IDE then Turbo because it will help you to have good interface to make codes. … | |
Re: I am Indian and I have degree of a very highly reputated college in India. I hope you have heard of IIT's which are damn famous all over the world. I am not from there , but still am from a college which ranked 8th in all over India in … | |
Re: [Click Here](http://www.geeksforgeeks.org/in-place-convert-a-given-binary-tree-to-doubly-linked-list/) your code matched with the code given here. It seems you are clear with the algo, but some issues are there which are hard to find by just looking at your code. I have given you link which you will find useful as it explains this concept very … | |
Re: declare your template outside the main() function and then try to compile it. hope it helps.! thanks. | |
Re: you have to show some effort first. We will help you for sure if you will show us something which you have tried. Do some research and try to explore things and ask any doubt if you face any problem. hope it helps! thanks. | |
Can we discuss some points on this ? Is it a good job for the freshers ? Some people may have some points in his/her knowledge regarding this. than please share it here. thanks in advance. :) | |
Re: [Click Here](http://www.codingunit.com/c-tutorial-for-loop-while-loop-break-and-continue) this might help u. you can read for learning the basics of loop. thanks. | |
how can i keep track of new users to my website. for ex: X is visiting my web-site regularly, so for per week count, i have to count him only once and if Y has visited as new user, then up the count by one. so how can i keep … ![]() | |
Re: try to put "break;" statement after each "case" ends. and then try to run your code again. hope it helps. for ex: switch(x) { case 1: // your statements break; case 2: // your statements break; } thanks. | |
Re: @rahul, i know. never try to propose like this(directly). Indians girls have attitude problem with them, no matter they deserve that or not :p. So, try to go on dates, movies, restraunts, pubs etc. If she is comfortable with you at these places without any problem, then it is GREEN … | |
Re: As your code is not much readable and also, too complex for this trivial algorithm. I will you suggest you few links and then try to read your code again as what i feel after reading your code is that you haven't understood the algorithm correctly. 1. [Click Here](http://en.wikipedia.org/wiki/Depth-first_search) 2. … | |
Re: yeah. Consult a lawyer. And try to compromise with him only somehow if it is possible, because lawyer fees and the time which courts and lawyer will take, that may cost you much more than the cost which he is expecting from you. i have seen many cases like this … | |
Re: size_t fread ( void * ptr, size_t size, size_t count, FILE * stream ); I will suggest you to use sizeof operator for second parameter in the fread function. although, it will work correctly for some cases, but it will be problematic if integer is of 4 bytes on any … | |
Re: If you are totally new to C++, then try some easy codes first which involves very simple file handling. [Click Here](http://www.cplusplus.com/reference/) then try something with string header , then try to make programs which involves both, then try this code. After this step-by-step procedure , this code will be very … | |
Re: a best approach will be that uninstall it and again install your visual studios, 2012. I had same problem 10-11 days back, the problem was solved after reinstalling it. don't know if it will work for you, but it worked for me. hope it helps. thanks. | |
![]() | Re: No body can help in your home work. You can put your doubts here , We all will help you. You should show something first, then we can solve if there is any doubt related to that. put some efforts into this, and if you find any problem, we will … |
Re: i don't think there is any function scanf_s in the library. replace scanf_s with scanf and then try to run it. I think everything else is looking fine to me. hope it helps! thanks. | |
Re: copying-paste your errors which you are getting will be helpful. paste your errors or tell me what type of error are you facing ? | |
Re: yes, it will help.. atleast me. thanks a lot. ;) | |
Re: bro, don't worry! i know how you are feeling. you are in same boat like me. i also do topcoder, codeforces, codechef and all. i know what your problem is. i had also thought like you initially, but in one year i started thinking in terms of algorithms. even i … | |
Actually, I have learnt C++ much till now . Atleast which i need for my work purposes. I have thought of a project-- desktop calculator. I want to have all these functionalities in it. 1. mathematical functions, 2. prime number checker(will apply primality checking algos), 3. all error handlers (zero … | |
when i visit C or any other section, i see those scrap pictures in the boxes of the persons who don't have their pics uploaded. it always give me feel that website is not loaded properly, so i again refresh it. i am old user of daniweb, so that's why … | |
can you please explain me what exactly it is ? i have read from my book, wiki link and 1 more link. i got some basic things, can you tell me how exactly this helps process and OS ? how this thing help us to implement cache ? i think … | |
today is "Rakshabandhan". I don't think many of you have heard of this. in this, sisters tie a band type something on their brother's wrist and in return brother gove gifts to them and they pray for long life of each other. we eat sweets and dance and we have … | |
Re: when i was using the daniweb before that change, it was nice. but when you have changed that, it was even more nice, but took some time to me to get used to with it. secondly, i dn't know why people are not posting the questions or replies. changing platform … | |
actually, i am demotivated with the rejections. i have got 3 rejections yet in directi (second-last round), AMZON(last round) and facebook (first round). how to make myself confident ? can you all help me in this also. this is totally different from computer science, but i think you all have … | |
when i click my any microsoft office's product then it start geetting installing. it is installed from 4-5 years and was wroking fine. it happened 10 days before. now i cant open my word, excel or any other file. when i try to unsitall it , it says "this product … | |
can we discuss the things like : what should we do , how should we behave , what not to do , what to do , how to feel comfortable in interview ? can we discuss these things ? what not to ask interviewers ? | |
actually, this is an interview question of a company which deals with adds on mobile phones. can anyone give me hint on this ? what can be the answer of this ? it is therotical question though.thanks. | |
#include main() { int ret; ret=fork();ret=fork();ret=fork();ret=fork(); if(!ret) printf("sun"); else printf("solaris"); } how many times sun will be printed and how many times solaris will be printed ? and reason also. i know the fundamentals of fork() but still not able to catch the o/p here. thanks. | |
int ** foo(int row) { int *arr[100]; for(int i=0;i<10;i++) { arr[i]=malloc(sizeof(int)*10); } int **p=(int**)arr; return p; } what is the problem with this code snippet ? it is not a homework. it is my interview question. | |
Declare an array of function pointers that return a pointer to a func that in turn return a pointer to a char array. can you helpme in this . i have doubt in the last thing. if at the last it is "return a pointer to char", then i can … | |
actually, i am quite tensed these days. all companies are going to shower next month. i am preparing since last 2 months. C, C++, DS, ALgos, DBMS, OS, OOP, networking, projects etc which i have done and which am still doing. but lacking confidence. feeling as if i will not … | |
Code 1 : for(i=0; i<1000; i++) for(j=0; j<100; j++) x = y; Code 2 : for(i=0; i<100; i++) for(j=0; j<1000; j++) x = y; thanks. | |
class A { public: protected: int i; }; class B : public A { friend void f(A*, B*); void g(A*); }; void f(A* pa, B* pb) { // pa->i = 1; pb->i = 2; // int A::* point_i = &A::i; int A::* point_i2 = &B::i; } void B::g(A* pa) { … | |
actually, I was reading C++ from some time , but here i want to learn and imprve my OOPS concepts. IF you have some good links or some e-books or some good book name , please help me here. i have learnt from wiki, my one C book in which … | |
I was looking for the find and replace algorithm which editor softwares are using. for ex: notepad. when i search something and then when i replace it , how exactly it works. I am aware of rabin-karp and KMP algos. but i am wondering if they are most efficient ? … | |
my algo : 1.Construct a max(min) heap from first element of all array, 2. extract a max(min) value from the heap and write to output 3. get one more element from array which the value extracted step 2 was in. 4. repeat until heap is not empty can anyone tell … | |
int main() { printf("%u %s",&"hello",&"hello"); return 0; } can you please explain that how "hello" is working here ? i know it is string constant ? so it is acting as a pointer to a char like i do char *s= "daniweb"; so, if it is the case, then why … | |
Re: hmm... firstly procedure is : va_list ap; va_start(fmt,ap); then you can extract the variable agruments one by one using the va_arg(ap,type) . simple! If, you want to use va_list again for the same variable arguments, then end it first. how ? using va_end(ap); . now what ? now again repeat … | |
Re: yes! sometimes it doesn't show pictues, comments. everything keep running fine for me, but sometimes daniweb behave very slow, i dont know why. sometimes, it is slow when i need to swap from C to C++ or any other place. | |
An algorithm runs a given input size n.If n is 4096,the run time is 512 ms .If n is 16384 the run time is 2048 ms .what is the complexity of the algorithm in big-o notaion ? a)o(n^1/2) b)o(n) c)o(nlogn) d)o(n^2) o() is big-oh! is it logical ? I have … | |
can you please tell me how rand () is implemented ? i know it is library implementaion dependent. but still can you tell me the way in which it is mostly implemented ? i have searched on google, but didn't get anything which make me clear about my question. i … | |
code 1: void fun(const int **); int main() { int **p; fun(p); } code 2: void fun(const int **); int main() { const int **p; fun(p); } code 1 is compile error and 2 is not. can you explain why ? as per my knowledge, we can convert a non-const … | |
va_arg (ap,int(*)()) here, ap is the va_list type variable and it is started with va_start() already. the place where i have read this said that this is wrong and you have to typedef it first , then you can extract the pointer to a function from the va_arg(). why is … |
The End.