Thanks for the detailed reply anduril462, surely helped a lot to get things clear.
Type: Posts; User: gaurav_13191
Thanks for the detailed reply anduril462, surely helped a lot to get things clear.
I was browsing through some output questions in C language, where I found the following one.
#include<stdio.h>
int main()
{
char arr[] = "geeksforgeeks";
char *ptr = arr;
I was studying lcs problem from Cormen. Though I get the sub-problem structure for this problem, what I don't get is how the number of sub-problems are calculated. For 2 sequences X (1... m) and Y...
I was just going through Radix Sort algorithm. Though I got the logic and the concept used in it, I am still pretty much confused about the space complexity being O(k+n) for this algorithm. (where, k...
I can't even tell you what the mistake was, such a silly mistake :( , I accidentally made a WinMain project so it was expecting a WinMain function instead of int main, it runs easily now, wasted...
I am trying to run the recursive program for the rod cutting problem. My code compiles but fails to build. I am using MS Visual Studio 2010, here's the code:
#include<stdio.h>...
Ok.. thanks for the reply..
I know I should write it myself but the problem is that when I don't understand how the above recursion works, I don't think I would be able to write it myself. I know what the above code is trying...
Hi, I am trying to reverse a linked list recursively. But the problem is that I am not able to understand the code.
Here's the code:
void recursiveReverse(struct node** head_ref)
{
...
@commontater Ok.. I got it .. thanks! :)
@commontater You mean that formal parameters are not destroyed when the function returns? Please clarify.
@others Thanks for your replies. What I understood is that though head will be destroyed...
Hi, I have a slight confusion about the function for updating head pointer of a linked list.
Here is the code:
struct node *deleteFirst(struct node *head)
{
if(head != NULL)
{
Thanks for answering.. it seems that I will have to rewrite a lot of my code.
Hi, I am stuck in a problem where I have to set keyboard focus on a rectangle ( means I should get WM_KEYDOWN and WM_KEYUP when I press the key). You can think of it as the keyboard handling we get...
Well, thanks a lot. But I failed to mention that I am using pure 'C' for my project. It seems that I will have to think something else. Thanks, anyway :)
Hi, I am using date time picker in my project in which I need to select weeks from this control (just like weeks are selected in the top leftmost calendar and the corresponding dates are displayed in...
Thanks for your answer.. this was horrible for me too and so I did it wrong.
The following question appeared in my written exam for Morgan Stanley. Can anyone explain the output. Here's the code:
#include<stdio.h>
#define prn(a) printf("%d ",a)
#define print(a,b,c)...
I resolved the issue.. no need to answer.. thanks for all the answers.. :D :)
Ok I solved the above problem of inserting text.. but I have got another issue that I am unable to position the caret at the end position after updating my edit control text. It positions itself at...
@Commontater
I got your point, but can't I insert spaces using code?, like on press of a button, the caret should move ahead as if the user manually entered the space. Is it difficult to implement...
I am trying to manipulate caret position in an edit control using Winapi SetCaretPos() function. When the user clicks on a button, the caret in the edit box advances a certain number of pixels...
Can anyone suggest some good books for data structures in C (I want implementation too). I have already read Lipschutz data structures book but I want implementation too. One of my colleagues...
Yes, I debugged the program and choice variable contained ASCII 10(Linefeed) that caused the program to produce mysterious results.
Thanks for the suggestion, you are right, the choice variable was taking newline as the input and continuing the execution without user input. So i flushed the input buffer and now the program works...