pradeep_agrawal
Member
- Member since
- May 3, 2006
- Last active
- Sep 3, 2013
- Total activities
- 0
Activity feed
Recent contributions
-
#Threads
44dba7f7-e319-4a88-be72-5d0b298fbe1a
Currently IEEE-754 is being used as standard for storing decimal numbers (or rather say float point numbers) in memory. Refer <a href="https://en.wikipedia.org/...
-
#Threads
b5dedad8-7bac-4e26-895f-47309a9218aa
Based on ANSI C specification, if the argument passed to free does not matches with value returned by malloc/calloc/realloc, or if the...
-
#Threads
48580f03-0d0f-4278-88a1-44925fd19cdb
For making strong base, instead of Balaguruswamy or Let Us C++, I would recommend Thinking in C++ (Vol.1 and Vol. 2) by...
-
#Threads
bca57780-8486-41cd-b849-ab42b991f9db
Find below my piece of code for same. #include "stdio.h" int main() { int choice = 0; int sum = 0; while(sum...
-
#Threads
1a0b7717-7197-4bfb-8fd0-6f8f89949233
In C a variable of type char can also hold a -ve value and the range is from -128 to 127. So...
-
#Threads
2a79865b-72ea-44aa-a6bb-df41e8421b05
Below is my code for the given problem statement solved using recursion. #include "stdio.h" void function(int m, int n, int* loopIndexes) {...
-
#Threads
a0decda1-3bba-4821-a79c-c043a4433cf6
Refer the below post in which i have used doubly linked list as a stack. By looking into the code you should...
-
#Threads
69f947f3-3ab3-4177-9a2c-27967cde549d
Re: help in a program samairacan anyone give me the program for linked list with the foll conditions: 1.first node is created...
-
#Threads
08ca28dd-b970-48eb-8d79-b8d5f1379e59
sookie@Pradeep Regarding limitations pointed out by you - Brackets & precedence : good thing, I will see if I can add that...
-
#Threads
2cb427ff-43e2-4243-9cd9-1edd1bafa2d9
sookieHere goes my program in Java. Please check and review for improvements if it is failing for any expressions. I am very...
-
#Threads
0ab76bea-597f-43d2-9fca-964175b253d9
The above code works as per the given problem statement but have below limitations: 1. Does not give suitable output/error for invalid...
-
#Threads
9128821c-472a-4a0b-bac9-d72a8a8ccd58
Find below my sample code for given problem statement. #include "stdio.h" #define MAX_EXPRESSION_SIZE 400 typedef enum { OPERAND = 0, OPERATOR, BRACKET,...
-
#Threads
3aa4ee3f-f7f9-4e86-a2f5-36442ec08540
This is simple and straight forward program. Not scope of much improvement. -Pradeep
-
#Threads
ec13ac75-8958-4598-8108-9f4e7a09ba01
Could you please add more details on how the number of combinations can be c(n,m). As per me if you do simple...
-
#Threads
50e97da9-56e9-40d8-ad7a-6bf8b7f8cfb4
In union memory is shared between different variables which can be used for: - Manipulation of value of variable of one type...
-
#Threads
a2080530-d10b-476c-9e61-b8d89aacba2c
The code is working fine for me. I compiled and executed the code using JDK 6. -Pradeep
-
#Threads
bc1a760f-a957-42bf-aa23-b3614a5fe834
DLL stands for Dynamic Link Library. These are the libraries (collection of subroutines or classes) which can be dynamically loaded by other...
-
#Threads
57f4a883-0fd7-4a09-b2f1-618b8bc85836
zia.sepsisso do you mean that... if the user doesn't give any input, the catch block will be executed.. am i right with...
-
#Threads
8229a258-3fde-44bd-9957-87568c0ffed0
In the given code the readLine() method on object of BufferedReader is being called. This functions returns the string for the line...
-
#Threads
66834325-f05b-4a1c-a103-088504463c33
Reason why the code was not working is: 1. While taking user input for adding more record "(Y\N)" is used, instead '\\'...
-
#Threads
52d4dfc9-7638-4921-8f29-65f59cfd1e12
Below thread on CE forum may be of some help. #-Link-Snipped-# -Pradeep
-
#Threads
593b1815-654d-44db-8aea-d5c01401de48
Yes, English-Scared is right. Removing the two scanf statement (each present inside case statement) will fix the issue. I have modified your...
-
#Threads
1c0aec76-7732-4a4a-a8ad-43fea04d9759
@mech_guy I was comparing the results of your code with the results of my code. Your code worked fine till N=10. But...
-
#Threads
2e764f90-a75a-4249-ab8a-a405b6d95187
Below is my solution to the problem: #include "stdio.h" void displayseries(int* series, int count) { int i = 0; if(count != 0)...
-
#Threads
6bb84a53-05de-4b51-969f-b179657b6fbd
Good work buddy, now we have one working code 😁 I have few suggestions: 1. I feel the cout and for loop...
-
#Threads
3019273d-3367-4d7f-a1e7-aa38def064c7
safwanIs VB alllowed ?You can post solution in any language of your choice. -Pradeep
-
#Threads
96a5180a-1bd3-46a0-b739-80e16a74a654
@Durga, Big K Will surely start with the C programming threads, let me finalize what to include and a suitable sequence for...
-
#Threads
224e872c-6f05-41b9-803c-ac2e6e2c376f
durgaBy thew ay I was thinking I will put up my unfinished project and take your help completing it. though my Prof...
-
#Threads
d9ed6915-4e18-4812-91a4-1d64de3e8907
Re: Write a C program @Shalini, i looked into the code. The problem is with the logic of function getMoreReducedFormCombinations. As per...
-
#Threads
02d0315a-e5c5-4908-abc1-9656710fd337
Solution looks good to me, good work mech_guy. -Pradeep
-
#Threads
5d1f07fc-6723-46d6-87d3-d22a4a7a4b57
durgaAishwarya ..ooo mate she has grown old.. go for megan fox 😛 😁I don't mind going for Megan Fox if you can...
-
#Threads
db3ac97f-3bc3-4f6f-b958-2434d0759ca2
RajdeepCEOne humble question pradeep sir, What is your advise to fresh or final year computer engineering student?I would just say, if you...
-
#Threads
eeab7be4-743b-4629-93cb-406ee08bb025
crazyboyPradeep is very fond of exploring new places with buddies...Ahhh, how i missed that. Either it was the long summer or the...
-
#Threads
b05bb016-efca-4364-aa55-85f34fb3a152
The_Big_KPradeep is also an actor: Was involved in making a movie based on life of a software engineer, titled "Three Point No...
-
#Threads
268d1bf1-7e7b-4813-adf8-a40754b11eaa
Re: Write a C program sahithi pallaviHi everyone...I tried this program in C...but I am not successfull. can anybody pls help me....sahithi...
-
#Threads
585bdf86-6825-4716-9bf2-89d8503acd96
Re: Write a C program @Uday Good code buddy, liked the use of available function. Mastering over all languages huh.😉 @All Will...
-
#Threads
da0514d2-8597-409c-b753-b2192f3b9fa3
Here is my solution: Friend A = 1 min Friend B = 2 min Friend C = 5 min Friend D =...
-
#Threads
cf625e6e-758b-44a6-83a7-d7d9c9a79f59
Re: Write a C program I feel this is a good problem statement to code. Any takers? -Pradeep
-
#Threads
f264831c-a5d8-49af-b640-be51839a2c7c
That was also a good try mech_guy. But the formula that you have given works correctly till n = 6. When we...
-
#Threads
b6604722-dec0-4d35-8645-d18b3fac9d2c
The answer has a logic behind it. The single digit numbers are 0 to 9. But there are only 7 batsman and...
-
#Threads
77a34e97-ad84-4bf6-8d05-a5658d51bdf0
shalini_goel14OLet us suppose a car travels 1 km from some point A to some point B then that means wheels traveled 4...
-
#Threads
3c4dccc9-aad0-4685-a0b1-77bbc5e7efad
That's cool silverscorpion, this works 😀 -Pradeep
-
#Threads
a878a2fd-e73b-4a4a-84b7-d6163366d417
silverscorpion, not sure how you derived the formula. I tried with different value of n and i am not getting correct answers,...
-
#Threads
93a5de37-c4f9-4972-93ef-9d594dea3a62
RajdeepCESo the answer will be nth element of fibonacci series.Yes that the correct answer that the number of rabbits on nth day...
-
#Threads
0fc7ee2c-eb98-4ea9-8311-1593e746fbd1
here is my solution: I will take out one more tablet of Sildenafil and will dissolve all in a glass of water....
-
#Threads
484a3c24-7609-41df-b161-892df6da6356
That's really an interesting problem buddy. Here is my solution: Treasurer Thought: 1. He will think that pharmacist will make the strongest...
-
#Threads
17de6397-f9ef-42ef-be91-b02feb8ef4ab
The number of middle batsman can be 2 and the series can be 3 6 4 2 9 8 1 Here, product...
-
#Threads
b63474b0-d323-42e5-be30-58c04dfd26ed
By 1939yr and 1932yr i mean the age of the people. That i calculated based on the tribulation period which was of...
-
#Threads
5d9dc1ab-c1fe-42cb-aeaa-fb46a0f12451
shalini_goel14No each rabbit can give birth only in second month so for 1 month[i.e n=1] there will be 0 rabbit. PS: Correct...
-
#Threads
bfc67acc-c381-4099-881a-2e4d4a171db9
I edited the post to make question more clear. -Pradeep
-
#Threads
Rabbit Puzzle
There is a closed room where we left a rabbit. That rabbit has a unique property. It starts giving birth after 2nd...
-
#Threads
a9edba8e-9762-4727-a85f-6c96256d5f3b
I just forgot that the function sprintf is being used in the code given in the first post of the thread. My...
-
#Threads
4a3b108e-a588-4fe6-9454-59d7f56019b5
Is it 1939yr and 1932yr? -Pradeep
-
#Threads
b81c8c72-65f5-4a38-aab5-6e438d638da6
Hi ashutoshglamour, instead of posting new query in any existing thread please start a new thread for new query. -Pradeep
-
#Threads
8f3e405f-0ab0-4015-a1ce-44ea0f026f01
Let me explain the logic behind the solution. A person can visit a door only if the door number is completely divisible...
-
#Threads
6991853f-4fee-4ac2-acb9-d433233f7685
Here is my solution: Pick a fruit from box "Apple and Orange". If the fruit is Apple: Apple and Orange -> Apple...
-
#Threads
d9458afa-02fb-458e-b241-9a222dc7a355
tech_vaibhav_ee, you are really good at puzzle solving. Both the answer and the explanation given above is correct. -Pradeep
-
#Threads
Count Doors
There are 1000 rooms (numbered from 1 to 1000) and 1000 persons (also numbered from 1 to 1000). Assume that all doors...
-
#Threads
d2de5023-ff40-408e-9626-acf3b887de1d
That was quick. It's a correct answer with correct and good explanation. Good going English-Scared. -Pradeep
-
#Threads
Horse Race
There are 25 horses. Given that only five horses can run at a time in a race, how many races do you...
-
#Threads
e4ff51f8-900e-4007-ba6e-aef1b49e6d35
That's a correct answer with correct reason behind the behavior. Awesome buddy. -Pradeep
-
#Threads
ede39f39-d1c1-4d14-80c6-bd0a90e9715d
silverscorpionWhy does ch.b occupy the first position and ch.c the second? Is it because of the way we have defined them??Yes it...
-
#Threads
df985cba-0956-4540-959c-d2b1d5255540
English-Scaredon 32-bit machine Integer takes 4 bytes , why does it take 4 ?The data type 'int' was intended to always have...
-
#Threads
1c53078c-872a-4a48-ab30-a28607db2da4
vishnu priyaThe answer,, 7*2=14 7*7*7*7*4=9604 14+9604=9618 legsAny specific rational behind not counting legs of 7 cats present in a bag (7people *...
-
#Threads
Black or White Pebble
There is a bowl containing black and white pebbles. You pick up two pebbles randomly at a time. 1. If both are...
-
#Threads
d65015d3-f596-4a33-be89-80d92f04730f
To understand the logic behind the behavior, its good to have understanding of union. This is described below under "Understanding Union". For...
-
#Threads
d15333a6-7ff0-4788-b71e-c34eae9274c7
crazyboyMy try for first one... 2, 8, 7, 28, 27, 108, 107, 428........I also thought of the same solution 😀 I feel...
-
#Threads
a5e79edb-1059-40da-88ce-4f5204b3ed53
rohitvishnu, in the given code you are converting the value to a required precision using format specifiers. But again you are storing...
-
#Threads
97028482-c032-4af2-8d0e-a9c34875450e
@Durga, few corrections. The declaration that you have done is declaration of a new data type and not a variable (as you...
-
#Threads
b2f6d6c2-f1cb-4130-b620-5b56e4b13a2e
7people * 2legs = 14legs 7people * 7bags * 7cats * 4legs = 1372legs 7people * 7bags * 7cats * 7small cats...
-
#Threads
92dafce5-bb35-48bb-899b-01a5570f405d
durgathanks! But what is wrong with "typedef struct sortElement sortElement;" is it not same as saying take "struct sortElement" as sortElementWhen we...
-
#Threads
e52af564-fc4e-42e0-bf04-de530149ff41
As you are declaring correct variables inside the body of struct so there is only one issue is the declaratio sortElement *element[24];...
-
#Threads
066ddbac-1d75-4cff-aac9-3daa109fc700
Yes Big K is correct. Google search is based on page rank. And the rank of page is based on various other...
-
#Threads
621bacfd-8fc0-4e3c-a87c-8edf83976bf7
Corpse-ThrustI guess C doesn't support creating pointers to custom data types. Only C++ does.C language do support creation of pointers to user...
-
#Threads
b404c881-e86f-4783-92cc-8f09c02af553
4! - 4 - (4/4) = 19 8 + 8 + cuberoot(8) + cos(8) = 19 ((8 + cuberoot(8)) * cuberoot(8)) -...
-
#Threads
3d94861f-f5ec-4334-bd4a-d884af9c837e
Do we allow operations like cube root and using sin, cos, etc. (for this we may need to take approximate values)? -Pradeep
-
#Threads
4889bcb5-c3c8-4153-a632-aa2bc814f166
shalini_goel148 * 8 + sqrt(sqrt(8+8)))=18I feel yyou mean to say 8 + 8 + sqrt(sqrt(8+8)))=18 -Pradeep
-
#Threads
fcacf8ac-b836-47a4-b414-5b78ca8b8aa0
4 * 4 + (4/4) = 17 8 + 8 + (8/8) = 17 Go for 18. -Pradeep
-
#Threads
6fef5c18-1ce4-4d5e-994f-816490a5591f
As per my logic the series of differences will be: 1,2,-1,4,1,-2,-1,8,1,2,-1,-4,1,-2,-1,16,1,2,-1,4,1,-2,-1,-8... And hence the series of actual numbers will...
-
#Threads
f1e16a4c-35e6-4c0d-8963-51a098813f11
RajdeepCEI am giving some more elements, hope this will help you: #->>> 0,1,3,2,6,7,5,4,12,13,__,__,__,__,.... Now you will have to specify the next four...
-
#Threads
0486d355-b442-4bb7-949b-482eaea3b2d3
English-ScaredDude if you consider it 5-7 is -2 not 2 . So i guess the series may not be correct wat say?Thanks...
-
#Threads
4982cae3-b659-43f7-adac-705a717343da
That's a tough one. I guess it should be 4 but not sure. Reason: The series is: 0,1,3,2,6,7,5,__,__,__ If we take difference...
-
#Threads
bac7d9e8-2302-4ee6-91a9-d8520e1a2baa
Below is my solution: 5,17,37,65,101,__,__,__,.... Considering x(0) = 5, the equation should be: x(n+1) = x(n) + 12 + 8*n Hence, x(5)...
-
#Threads
e77d1bd8-598e-4798-b33d-4c1a8b681fdd
Below is my solution: 1-> 1,2,2,4,5,9,13,22,__,__,__,... Considering x(0) = 1, x(1) = 2, the equation should be: x(n+1) = x(n) + x(n-1)...
-
#Threads
41e756f0-0738-4c9c-8195-0eccd34af41a
The_Big_KOur current systems allows the thread to be rated from 1-5. I'll have to go through and see if this request can...
-
#Threads
14dfe3bc-b124-40ea-b3fb-f1c9346ab0d5
Corpse-Thrust@Pradeep -> quick n00b question, but what's validation of input?If your program does work/does not work for particular set of values (e.g.,...
-
#Threads
35d8ef20-d7af-437d-ab7f-822f221c2807
That's a small and sweet solution to the problem. Good work Slashfear. slashfear@pradeep, Good solution dude......... (Can't we make a solution in...
-
#Threads
a99aa650-da1d-4229-8e3e-133345614a22
rama_krish627I compiled and executed the above program successfully. Intially it shows some errors that conio.h is not found and clrscr() not in...
-
#Threads
Marking a post as useful
A thread may be for any query and may contain large number of posts. If someone later refer the thread for similar...
-
#Threads
f05f54f8-4557-46c1-8b0e-b854b6897bb8
For programming C/C++ under linux i feel the tools gcc, gpp, gdb, make will be useful. FInd below the links for same....