pradeep_agrawal
@pradeep-agrawal-rhdX5z Member
- Member since
- Joined
- Last active
- Active
- Member number
- Member #500
- Posts
- 11
- Replies
- 189
- Reactions
- 0
- Active days
- 0
Contributions
Last 12 months
0 contributions
- Active days
- 0
- Longest run
- 0 days
- Current run
- 0 days
Trophies
Featured trophies
0 / 8
Swipe or scroll to see more trophies
Recent contributions
-
Replied #Threads
Decimal to binary conversion
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/wiki/Floating_point"...
-
Replied #Threads
C programming doubt ?
Based on ANSI C specification, if the argument passed to free does not matches with value returned by malloc/calloc/realloc, or if the space has already been...
-
Replied #Threads
Recommend a C++ book for begineers
For making strong base, instead of Balaguruswamy or Let Us C++, I would recommend Thinking in C++ (Vol.1 and Vol. 2) by Bruce Eckel for startup....
-
Replied #Threads
2nd c++ Problem
Find below my piece of code for same. #include "stdio.h" int main() { int choice = 0; int sum = 0; while(sum != 20) { while((choice...
-
Replied #Threads
What is the minimum value of char type?
In C a variable of type char can also hold a -ve value and the range is from -128 to 127. So the min. value taht...
-
Replied #Threads
How to write programme for 'M' for loops dynamically
Below is my code for the given problem statement solved using recursion. #include "stdio.h" void function(int m, int n, int* loopIndexes) { printf("Hello\n"); } void mNumber...
-
Replied #Threads
Double linked list program
Refer the below post in which i have used doubly linked list as a stack. By looking into the code you should be able to write...
-
Replied #Threads
help in a program for linked list
Re: help in a program samairacan anyone give me the program for linked list with the foll conditions: 1.first node is created 2.we have to ask...
-
Replied #Threads
Write a program to generate RPN expression
sookie@Pradeep Regarding limitations pointed out by you - Brackets & precedence : good thing, I will see if I can add that into my above program...
-
Replied #Threads
Write a program to generate RPN expression
sookieHere goes my program in Java. Please check and review for improvements if it is failing for any expressions. I am very bad in testing my...
-
Replied #Threads
Write a program to generate RPN expression
The above code works as per the given problem statement but have below limitations: 1. Does not give suitable output/error for invalid expressions 2. Need any...
-
Replied #Threads
Write a program to generate RPN expression
Find below my sample code for given problem statement. #include "stdio.h" #define MAX_EXPRESSION_SIZE 400 typedef enum { OPERAND = 0, OPERATOR, BRACKET, STR } datatype_t; type...
-
Replied #Threads
Enormous Input Test
This is simple and straight forward program. Not scope of much improvement. -Pradeep
-
Replied #Threads
select m*m matrix from m*n matrix
Could you please add more details on how the number of combinations can be c(n,m). As per me if you do simple selection (without crossing boundaries...
-
Replied #Threads
confusion in "union"
In union memory is shared between different variables which can be used for: - Manipulation of value of variable of one type by manipulation variable of...
-
Replied #Threads
Help me: Find the error in this java program
The code is working fine for me. I compiled and executed the code using JDK 6. -Pradeep
-
Replied #Threads
What is .dll file ?
DLL stands for Dynamic Link Library. These are the libraries (collection of subroutines or classes) which can be dynamically loaded by other programs. The DLL is...
-
Replied #Threads
Can anyone explain the exception concept in this JAVA program?
zia.sepsisso do you mean that... if the user doesn't give any input, the catch block will be executed.. am i right with my view????No, the program...
-
Replied #Threads
Can anyone explain the exception concept in this JAVA program?
In the given code the readLine() method on object of BufferedReader is being called. This functions returns the string for the line read from the specified...
-
Replied #Threads
Please help me find error in the program
Reason why the code was not working is: 1. While taking user input for adding more record "(Y\N)" is used, instead '\\' should be used as...
-
Replied #Threads
C programming to Database connection
Below thread on CE forum may be of some help. #-Link-Snipped-# -Pradeep
-
Replied #Threads
find the error in this program
Yes, English-Scared is right. Removing the two scanf statement (each present inside case statement) will fix the issue. I have modified your code with above change...
-
Replied #Threads
Representing number as sum of smaller numbers
@mech_guy I was comparing the results of your code with the results of my code. Your code worked fine till N=10. But after that it skipped...
-
Replied #Threads
Representing number as sum of smaller numbers
Below is my solution to the problem: #include "stdio.h" void displayseries(int* series, int count) { int i = 0; if(count != 0) { for(i = 0;...
-
Replied #Threads
Representing number as sum of smaller numbers
Good work buddy, now we have one working code 😁 I have few suggestions: 1. I feel the cout and for loop at the end of...
-
Replied #Threads
Representing number as sum of smaller numbers
safwanIs VB alllowed ?You can post solution in any language of your choice. -Pradeep
-
Replied #Threads
KYCEan - Pradeep_Agrawal
@Durga, Big K Will surely start with the C programming threads, let me finalize what to include and a suitable sequence for same. -Pradeep
-
Replied #Threads
KYCEan - Pradeep_Agrawal
durgaBy thew ay I was thinking I will put up my unfinished project and take your help completing it. though my Prof awarded 80 % marsk...
-
Replied #Threads
Representing number as sum of smaller numbers
Re: Write a C program @Shalini, i looked into the code. The problem is with the logic of function getMoreReducedFormCombinations. As per the logic of the...
-
-
Replied #Threads
KYCEan - Pradeep_Agrawal
durgaAishwarya ..ooo mate she has grown old.. go for megan fox 😛 😁I don't mind going for Megan Fox if you can get her as a...
-
Replied #Threads
KYCEan - Pradeep_Agrawal
RajdeepCEOne humble question pradeep sir, What is your advise to fresh or final year computer engineering student?I would just say, if you want to go for...
-
Replied #Threads
KYCEan - Pradeep_Agrawal
crazyboyPradeep is very fond of exploring new places with buddies...Ahhh, how i missed that. Either it was the long summer or the side effect of the...
-
Replied #Threads
KYCEan - Pradeep_Agrawal
The_Big_KPradeep is also an actor: Was involved in making a movie based on life of a software engineer, titled "Three Point No One" 😁 Unfortunately, the...
-
Replied #Threads
Representing number as sum of smaller numbers
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 pallavi, let us know...
-
Replied #Threads
Representing number as sum of smaller numbers
Re: Write a C program @Uday Good code buddy, liked the use of available function. Mastering over all languages huh.😉 @All Will wait for few more...
-
Replied #Threads
GF's Passtime Puzzles--With New Format
Here is my solution: Friend A = 1 min Friend B = 2 min Friend C = 5 min Friend D = 8 min Step 1:...
-
Replied #Threads
Representing number as sum of smaller numbers
Re: Write a C program I feel this is a good problem statement to code. Any takers? -Pradeep
-
Replied #Threads
Rabbit Puzzle
That was also a good try mech_guy. But the formula that you have given works correctly till n = 6. When we have n = 7:...
-
Replied #Threads
Seven Sportsmen
The answer has a logic behind it. The single digit numbers are 0 to 9. But there are only 7 batsman and each have different digits...
-
Replied #Threads
GF's Passtime Puzzles--With New Format
shalini_goel14OLet us suppose a car travels 1 km from some point A to some point B then that means wheels traveled 4 km[as per Scorpion 1*4...
-
-
Replied #Threads
Rabbit Puzzle
silverscorpion, not sure how you derived the formula. I tried with different value of n and i am not getting correct answers, e.g., For n =...
-
Replied #Threads
Rabbit Puzzle
RajdeepCESo the answer will be nth element of fibonacci series.Yes that the correct answer that the number of rabbits on nth day will be the nth...
-
Replied #Threads
Blue Pill Problem
here is my solution: I will take out one more tablet of Sildenafil and will dissolve all in a glass of water. Once all the four...
-
Replied #Threads
The King and the Poison
That's really an interesting problem buddy. Here is my solution: Treasurer Thought: 1. He will think that pharmacist will make the strongest poison so that pharmacist...
-
Replied #Threads
Seven Sportsmen
The number of middle batsman can be 2 and the series can be 3 6 4 2 9 8 1 Here, product of first three =...
-
Replied #Threads
GF's Passtime Puzzles--With New Format
By 1939yr and 1932yr i mean the age of the people. That i calculated based on the tribulation period which was of 7years (2555 days). If...
-
Replied #Threads
Rabbit Puzzle
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 me if wrong.Yep, you...
-
-
Posted #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 month of its own...
21 replies -
Replied #Threads
help needed in a c program
I just forgot that the function sprintf is being used in the code given in the first post of the thread. My apologies. If you would...
-
-
Replied #Threads
help needed in a c program
Hi ashutoshglamour, instead of posting new query in any existing thread please start a new thread for new query. -Pradeep
-
Replied #Threads
Count Doors
Let me explain the logic behind the solution. A person can visit a door only if the door number is completely divisible by the number associated...
-
Replied #Threads
The Boxes
Here is my solution: Pick a fruit from box "Apple and Orange". If the fruit is Apple: Apple and Orange -> Apple Orange -> Apple and...
-
Replied #Threads
Count Doors
tech_vaibhav_ee, you are really good at puzzle solving. Both the answer and the explanation given above is correct. -Pradeep
-
Posted #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 are closed at first....
7 replies -
Replied #Threads
Horse Race
That was quick. It's a correct answer with correct and good explanation. Good going English-Scared. -Pradeep
-
Posted #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 need to find top...
2 replies -
Replied #Threads
Black or White Pebble
That's a correct answer with correct reason behind the behavior. Awesome buddy. -Pradeep
-
Replied #Threads
Can anyone explain this C program..
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 is because of the...
-
Replied #Threads
Can anyone explain this C program..
English-Scaredon 32-bit machine Integer takes 4 bytes , why does it take 4 ?The data type 'int' was intended to always have size equal to the...
-
Replied #Threads
Cat twister
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 * 7bags * 7cats *...
-
Posted #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 white, you throw away...
2 replies -
Replied #Threads
Can anyone explain this C program..
To understand the logic behind the behavior, its good to have understanding of union. This is described below under "Understanding Union". For the user who know...
-
Replied #Threads
Brain Teasers : Mathemetics
crazyboyMy try for first one... 2, 8, 7, 28, 27, 108, 107, 428........I also thought of the same solution 😀 I feel the second series should...
-
Replied #Threads
help needed in a c program
rohitvishnu, in the given code you are converting the value to a required precision using format specifiers. But again you are storing the result in a...
-
Replied #Threads
linked list in C II
@Durga, few corrections. The declaration that you have done is declaration of a new data type and not a variable (as you are using typedef). Also...
-
Replied #Threads
Cat twister
7people * 2legs = 14legs 7people * 7bags * 7cats * 4legs = 1372legs 7people * 7bags * 7cats * 7small cats * 4legs = 9604legs...
-
Replied #Threads
linked list in C
durgathanks! But what is wrong with "typedef struct sortElement sortElement;" is it not same as saying take "struct sortElement" as sortElementWhen we declare a struct as...
-
Replied #Threads
linked list in C
As you are declaring correct variables inside the body of struct so there is only one issue is the declaratio sortElement *element[24]; is not correct. The...
-
Replied #Threads
Google Technology
Yes Big K is correct. Google search is based on page rank. And the rank of page is based on various other factors: - Number of...
-
Replied #Threads
linked list in C
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 defined data type. Below...
-
Replied #Threads
Old is Gold : Numberology!!!
4! - 4 - (4/4) = 19 8 + 8 + cuberoot(8) + cos(8) = 19 ((8 + cuberoot(8)) * cuberoot(8)) - cos(8) = 19 4!...
-
Replied #Threads
Old is Gold : Numberology!!!
Do we allow operations like cube root and using sin, cos, etc. (for this we may need to take approximate values)? -Pradeep
-
Replied #Threads
Old is Gold : Numberology!!!
shalini_goel148 * 8 + sqrt(sqrt(8+8)))=18I feel yyou mean to say 8 + 8 + sqrt(sqrt(8+8)))=18 -Pradeep
-
Replied #Threads
Old is Gold : Numberology!!!
4 * 4 + (4/4) = 17 8 + 8 + (8/8) = 17 Go for 18. -Pradeep
-
Replied #Threads
Brain Teasers : Mathemetics
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 be: 0,1,3,2,6,7,5,4,...
-
Replied #Threads
Brain Teasers : Mathemetics
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 elements of the series.I.....
-
Replied #Threads
Brain Teasers : Mathemetics
English-ScaredDude if you consider it 5-7 is -2 not 2 . So i guess the series may not be correct wat say?Thanks for bringing that up....
-
Replied #Threads
Brain Teasers : Mathemetics
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 of each consecutive number...
-
Replied #Threads
Brain Teasers : Mathemetics
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) = x(4 + 1)...
-
Replied #Threads
Brain Teasers : Mathemetics
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) - (n % 2)...
-
Replied #Threads
Marking a post as useful
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 be integrated with our...
-
Replied #Threads
Slashfear's Programming challenge!!!
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., in this case number...
-
Replied #Threads
Slashfear's Programming challenge!!!
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 a simple and smaller...
-
Replied #Threads
C Challenge: Self-Printing Program
rama_krish627I compiled and executed the above program successfully. Intially it shows some errors that conio.h is not found and clrscr() not in this scope. but finally...
-
Posted #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 query, he may need...
10 replies -
Replied #Threads
Programming in C/C++ under Linux
For programming C/C++ under linux i feel the tools gcc, gpp, gdb, make will be useful. FInd below the links for same. gcc/gpp: Compile C/C++ code...
-
Replied #Threads
Slashfear's Programming challenge!!!
@Corpse-Thrust, the code is just perfect. A simple and straight forward solution to the problem. Great going Corpse-Thrust. Few minor modification needed in code: 1. Validation...
-
Replied #Threads
Rate your fellow CEans over here
pradeep_agrawal rates Slashfear for #-Link-Snipped-# Reason: The code posted by Slashfear is a perfect example of work of genius. This motivates people to develop everything-is...
-
Replied #Threads
C Challenge: Self-Printing Program
That's really cool buddy, a perfect example of work of genius. A person can comment on a code when he has something better to offer. And...
-
Replied #Threads
Slashfear's Programming challenge!!!
Thanks for your appreciation Corpse-Thrust. Corpse-Thrustbtw is this solvable using simple procedural programming instead of the approach Pradeep used?I have used the procedural p...
-
Replied #Threads
Slashfear's Programming challenge!!!
Yesterday i was out of home so could not give this a try. Here is my piece of code for the given problem. #include "stdio.h" #define...
-
Replied #Threads
Some basic doubts in Algorithms and complexity..
@ silverscorpion, slashfear, Corpse-Thrust Thanks for your appreciation buddy. -Pradeep
-
Replied #Threads
Some basic doubts in Algorithms and complexity..
RajdeepCETime complexity it means the time taken to compile the algorithm by compiler.I would not agree with this. The time complexity is not the time taken...
-
Replied #Threads
Data Structure/Algorithm Challenger IV
Yes, this does not have a utility. I posted this question to see how many people read question carefully and give it a thought before jumping...
-
Replied #Threads
Data Structure/Algorithm Challenger IV
silverscorpionI think this is the best solution for the above problem. ie,. All I'm saying is, this doesn't require any real sorting. Hope I'm clear, and...
-
Replied #Threads
Data Structure/Algorithm Challenger IV
shalini_goel14Assuming it is not asked in C/C++ 😐,my program is in Java . As far as I know, its complexity is O(n log n). Correct me...
-
Replied #Threads
Database connectivity using C/C++ Tutorial!!!
slashfearYou will Get the output in the console as you get output for all C/C++ ProgramsIs there some way through which i can get the output...
-
Replied #Threads
Database connectivity using C/C++ Tutorial!!!
slashfearI just mentioned that those files (Library files) should be included so that, the header files (like #include<SQLAPI.h> and methods (like cmd.Execute, SA_connection) can b...
-
Replied #Threads
Database connectivity using C/C++ Tutorial!!!
Its good to see a article on a topic that many C/C++ programmer usually does not know about. Thanks for writing this article Slashfear. slashfearFor those...
-
Posted #Threads
Data Structure/Algorithm Challenger IV
This is a simple but trick one. Consider an array of size ‘n’. Array containing all numbers from 1 to n exactly once but distributed randomly...
8 replies -
Replied #Threads
FLAMES code
Why i said that it's of order n^3 because: 1. The loop "for (int i = flamesArrayList.size(); i > 1; i--)" cause order of n. 2....
-
Replied #Threads
FLAMES code
Ahhh, i too replied in hurry 😉. shalini_goel14but coming to your point no 3 in improvements required, I feel your piece of suggested code would give...
-
Replied #Threads
CrazyBoy's Cricket Quiz : Season I - 1
godfatherGarner!!!? his height?Joel Garner (born 16 December 1952 in Christ Church, Barbados) also known as "Big Joel" or "Big Bird", is a former West Indian cricketer,...
-
Replied #Threads
C Challenge: Self-Printing Program
I feel the actual problem statement is not just to read from a file and output the contents. That code will be dependent on the file...
-
Replied #Threads
Write a program to evaluate a determinant of any order n*n.
Below is my piece of code for same. #include "stdio.h" #define MAX_MATRIX_ORDER 10 void print_matrix(int matrix[MAX_MATRIX_ORDER][MAX_MATRIX_ORDER], int order) { int i = 0,...
-
Replied #Threads
FLAMES code
shalini_goel14Please ckeck my program also in Java for this Flames thing. Any doubts or flaws in this, feel free to speak. 😀Shalini, i looked into the...
-
Replied #Threads
FLAMES code
I have modified the code to make some items self-explanatory. Also added comments to the code. The main logic to calculating FLAMES based on the calculated...
-
Replied #Threads
Data Structure/Algorithm Challenger III
No solution from long time 😔 Below is my solution. node* nth_last(node* head, int n) { int count = 0; node* tmp = NULL; node* result...
-
Replied #Threads
FLAMES code
Below is my code for the given problem statement. #include "stdio.h" #include "string.h" #define MAX_NAME_LEN 80 #define INVALID 0 #define VALID 1 #define ASCII_UPPER_CASE_LOWE...
-
Replied #Threads
FLAMES code
enthudrivesThis code counts the number of letters left after striking out the common letters.The code currently does not gives the correct output. E.g., consider Name 1:...
-
Replied #Threads
Challenge cum problem in C/C++
That's cool, the program work perfectly as required. Slashfear, you rock buddy. Here is my piece of code for same problem. #include "stdio.h" void create_spiral(int **spiral,....
-
Replied #Threads
Data Structure/Algorithm Challenger III
slashfear /* written by: Arvind(slashfear) Language: C */ #include <stdio.h> #include <stdlib.h> struct node{ int data; struct node* next; }; int PrintNthFromEnd(...
-
Posted #Threads
Data Structure/Algorithm Challenger III
Write a function to find out the nth last element in a single linked-list. The prototype of the function can be defined as: node* nth_last(node* head,...
4 replies -
Replied #Threads
'C' related problems
I feel the output of the code main() { int *a, *s, i; s = a = (int *) malloc( 4 * sizeof(int)); for (i=0; i<4;...
-
Replied #Threads
'C' related problems
Re: Hi!!! seeya302004Output of the following program is Sorry Sravik! But i dont agree wid u, Explanation: When the value of i=0, den it will certainly...
-
Replied #Threads
Question asked in mysore xl soft company, if you can answer this
It will take 59sec to fill half the container so that in the next second it doubles and fill the full container. -Pradeep
-
Replied #Threads
Mismatch in arguments passed to a function and what a function can take
vivek.mIt wont work in C++ as in C++, it's necessary to declare function before using. Moreover, function arguments while calling that function must match with the...
-
Replied #Threads
Mismatch in arguments passed to a function and what a function can take
ms_csif you declared as a(char*,int);,then it wont work...compile time error will arise...I think the place where declaration resides plays an important rolesilverscorpionBut when...
-
Replied #Threads
Mismatch in arguments passed to a function and what a function can take
bharathkumarpi think once u enter the return 0 in the main function it will never come to the called function. so it come out without showing...
-
Posted #Threads
Mismatch in arguments passed to a function and what a function can take
Why the below code works fine without any compile time or runtime errors? #include “stdio.h” int main() { a('c'); return 0; } a(char* ch, int i)...
9 replies -
Replied #Threads
Addition of 2 positive intgers
That's a piece of good code Slashfear. But i thought the initial requirement was to not use even the shift operator while doing this. rohitvishnuhey can...
-
Replied #Threads
sizeof() in 'C'
Slashfear, this time you got the correct reason behind the behavior and provided a detailed explanation. I really appreciate that. Thanks. -Pradeep
-
Replied #Threads
c++ doubt
vivek.m #include <iostream> using namespace std; class B { public: B(int r){a = r;} int getValue(){return a;} private: int a; }; class A { public: A(int...
-
Replied #Threads
sizeof() in 'C'
vivek.mI can think of only one possible reason why this is happening: sizeof() makes a temporary copy of the object that is passed as argument. So,...
-
Replied #Threads
sizeof() in 'C'
slashfearI think the question your trying to ask is, we have used ++i and so the value of i should be incremented from 0 to 1....
-
Posted #Threads
sizeof() in 'C'
Below code was compiled and executed on a 32-bit machine where size if 'int' is '4': #include “stdio.h” int main() { int i = 0, j...
7 replies -
-
Replied #Threads
C program - Why does this happen??
To understand the logic behind this, its good to have understanding of the storage of variables in the memory. This is described below under "Number Representation"....
-
Replied #Threads
c++ doubt
Hi Deeksha, The code will not work for two reasons: 1. The variable a of class emp is private and can't be accessed directly outside the...
-
Replied #Threads
what is the output of 'c++' code?????
slashfearHi abhi (Guess thats your name!!), so the output of the code is: num: 190The output does not comes as 190 when user compiles the code...
-
Replied #Threads
Java code to create windows like menu
Re: Explore.. Hi Revss, avoid use of SMS text while posting on the forum. It will be of help to me and other members in clearly...
-
Replied #Threads
help with C programs
abbd1990, post the code of your other problems (even if they are non-working). That will help us in identifying where you are stuck. -Pradeed
-
Replied #Threads
what is the output of 'c++' code?????
silverscorpionI use turbo C 16 bit compiler and I got -28 as the answer. How will you get 190 as the answer? What is the compiler...
-
Replied #Threads
Addition of 2 positive intgers
I feel the below code will do addition of two positive integers without using arithmetic or shift operators. int add(int a, int b) { int sum...
-
Replied #Threads
difference between post and pre increment op
shalini_goel14Any ideas why the output is 52 in java and not 53?I feel in Java the left portion of binary operator is evaluated first and then...
-
Replied #Threads
what is the output of 'c++' code?????
MaRoPlease give more info about your machine & compiler you using.I am using a 32-bit gcc compiler and running it on 32-bit RHEL5 machine. For using...
-
Replied #Threads
what is the output of 'c++' code?????
impecable_abhivoid main() { int num=190*300/300; cout<<"num:"<<num; } explain me !!!!!!what is the logic behind it????I compiled the above code for 32-bit machine and then execute...
-
Replied #Threads
difference between post and pre increment op
shalini_goel14x=25 x= x++ + x++ It will be taken as x =(x++) + (++x) LHS= x RHS= (x++) + (++x) ... so final value of x=52....
-
Replied #Threads
C++ Programs by Yamrajbhalla
Yes that should be [(3+3i)/(5+5i)] * [(5-5i)/(5-5i)]. I did all calculation using [(3+3i)/(5+5i)] * [(5-5i)/(5-5i)] but mentioned [(3+3i)/(5+5i)] * [(5+5i)/(5+5i)] by mistake. Th...
-
Replied #Threads
Need the full working code
If found multiple issue with the below code: b operator -(b c) { b t; char tm[50]; for(int i=0;i<=(strlen(nm)+1);i++) { for(int j=0;j<=(strlen(c.nm)+1);j++) if...
-
Replied #Threads
C++ Programs by Yamrajbhalla
The program looks good except the logic of for * (multiplication) and / (division). The code for that was mentioned as complex operator *(complex c) {complex...
-
Replied #Threads
Need the full working code
Its always a good practice to first try to solve the problem and then get help if stuck somewhere. We will be more than happy to...
-
Replied #Threads
A BIg Problem with dynamic memory allocation
Raviteja.gbut now i came to know that pointers are there in C++ too. Am i right?Yes, C++ have pointers too. And it provides better and more...
-
Replied #Threads
A BIg Problem with dynamic memory allocation
~bill() {delete item;} };Above part of the code is creating problem. This is destructor of the class 'bill' and it is called when the object of...
-
Replied #Threads
A BIg Problem with dynamic memory allocation
yamrajbhallait gives me right output bt after that c++ complier closes and a error occursCould you please update which compiler you are using? Is there any...
-
Replied #Threads
A BIg Problem with dynamic memory allocation
yamrajbhallai declared a array of pointer *nm[10]; in class and i need to input data in it and dynamically allocate memory for this and also i...
-
Replied #Threads
Find the way to find inverse matrix urgent
Below is my sample code to determine inverse of a matrix of order n. #include "stdio.h" #define MAX_MATRIX_ORDER 10 void print_matrix(int matrix[MAX_MATRIX_ORDER][MAX...
-
Replied #Threads
C function for addition of two single variable polynomials
Hi friendster7, I did not tried running your code but here are some of my view: 1. Since you are initilizing p1 & p2 with next...
-
Replied #Threads
Data Structure/Algorithm Challenger II
sumitjamihey the above code checks only between the two nodes but instead if we can modify the data node then include a flagYes this can be...
-
Replied #Threads
Data Structure/Algorithm Challenger II
No solution from such a long time 😔 Here is a sample code for the given problem statement. Solution is based on fact that in a...
-
Replied #Threads
Data Structure/Algorithm Challenger I
Posting a sample code as per the solution stated by Sahana. int IsCircle(node* head) { node *tmp1; node *tmp2; int result = 0; //Specify no circular...
-
Replied #Threads
Programming Challenge - Try this (Triangle problem)
sreelu_abut code given calculates the maximum count for a particular row but that may not leed to maximum count for the complete triangleThe code posted in...
-
Replied #Threads
programming problem in C++
Below is a sample code for above problem statement. #include "stdio.h" #include "string.h" #define MAX_STRING_LEN 100 int main() { char str[MAX_STRING_LEN + 1] = {0}; int.....
-
Replied #Threads
Programming Challenge - Try this (Triangle problem)
No taker for the second part of the problem 😔 Ok, here is my solution. #include "stdio.h" #define MAX_SUPPORTED_ROWS 100 int sum(int a[MAX_SUPPORTED_ROWS][MAX_SUPPORTED_ROWS...
-
Replied #Threads
Programming Challenge - Try this (Triangle problem)
Thank you Sriram. I would now like to take the problem to next level. Modify the sample program given above (or write your one code) that...
-
Replied #Threads
Programming Challenge - Try this (Triangle problem)
Try the code: #include "stdio.h" #define MAX_SUPPORTED_ROWS 100 int sum(int a[MAX_SUPPORTED_ROWS][MAX_SUPPORTED_ROWS], int row_count, int i, int j) { int highest_sum = 0;...
-
Replied #Threads
Program to check that the string you enter at runtime is a valid variable declaration
Re: Program to check that the string you enter at runtime is a valid variable declara The solution to the problem is a parser which parse...
-
Replied #Threads
Creating Installation Package
You can build installers for your project either by using open source tools like - Wix or by using licensed tools like - Microsoft Visual Studio...
-
Replied #Threads
download link for mercury loadrunner
dips_sreewhen i register and trying to download that it is asking to open .iso file to download. When i click on .iso file, i cannot download...
-
Replied #Threads
CE Meet @ Pune/Mumbai (India) - Join In!
I am also interested. I am available on all weekend and i will prefer Pune as Venue. I am a Computer Science graduate, so as per...
-
Replied #Threads
download link for mercury loadrunner
azeemuddinthis link never works now only 500 errors The link is still working, i tried it 5 min. back. -Pradeep
-
Replied #Threads
Programing with JAVA
Re: prgraming with java I would also recommend 'Thinking in Java' by Bruce Eckel available for free download at #-Link-Snipped-# -Pradeep
-
Replied #Threads
programming in C & C++
There was a thread on comp.lang.c++ on how to approach learning C++. Read the pointers given by Bjarne Stroustrup @ #-Link-Snipped-#. Also you will get lots...
-
Replied #Threads
RAID-5 configuration
kidakakayou can have parity RAID on a single drive in RAID5 as well.Is having parity on a single drive are not property of RAID3 and RAID4?...
-
Replied #Threads
RAID-5 configuration
engineer_vinaycan anyone tell about RAID-5 configuration?RAID5 is based on parity so is called as Parity RAID. It checks data using parity. There is no dedicated drive...
-
Replied #Threads
Difference between 32-bit and 64-bit Microsoft Vista OS
Apart from the performance difference described above some others are: - Less numbers of softwares (including drivers) are available for 64-bit Vista. Also, other 64-bit systems.....
-
Replied #Threads
Request: Need the best C++ tutorial
I hope some of these may help: 1. Its always good to follow C++ coding standards while writing any piece of code. Have look at #-Link-Snipped-#...
-
Replied #Threads
Best Practices in Developing Test Cases
I am a developer so i don't have idea of the practices for black box testing. But i think this should be considered while testing: -...
-
Replied #Threads
problem in matrix multiplication
sahanai have to multiply 2 n*m matrices using pointersWhen you say pointers, do you meant that the matrices are implemented using linked list? Could you please...
-
Replied #Threads
Data Structure/Algorithm Challenger II
sahanaisnt the one by single linked list considered to be the most optimal?The solution given for singly linked list may be optimal for it, but a...
-
Replied #Threads
help for writing compliers
sahanashould i go necessarily for gccI would always recommend to use gcc over TC. sahanathat means i have to install linux?No need to install Linux, use...
-
Replied #Threads
c++ software
I will suggest to give gcw (gcc for windows) a try. Its available for download at <a href="https://sourceforge.net/projects/gcw/" target="_blank" rel="nofollow noopener noreferrer"...
-
Replied #Threads
help for writing compliers
sahanado i have to store the TC and this parser generator software in same folder?No, you don't need to keep the TC and lex tool in...
-
Replied #Threads
Algorithm related to "Intrusion detection System"?
Re: Algorithm related to "Instruction detection System"? Follow below links for details on Intrusion Detection and IDS: <a href="https://en.wikipedia.org/wiki/Intrusion-detection_...
-
Replied #Threads
Algorithm related to "Intrusion detection System"?
Re: Algorithm related to "Instruction detection System"? saurabhm giving seminar on "Instruction detection System"... Do you mean "Intrusion Detection System"? -Pradeep
-
Replied #Threads
help for writing compliers
sahanaThanks a ton friendster7 and pradeep.😀Welcome Sahana. The_Big_KPradeep, I know you're a Linux Guru. How about starting development activity on CE forums? Possible or its j...
-
Replied #Threads
C problem: What does void strcpy(char *buffer, char const *string) mean?
But its better to use errno_t strcpy_s(char *strDestination, size_t numberOfElements, const char *strSource); instead of strcpy. Consider case that your destination buffer is of s...
-
Replied #Threads
C problem: What does void strcpy(char *buffer, char const *string) mean?
The prototype is: void strcpy(char *buffer, char const *string); The function copies the string pointed by variable 'string' to variable 'buffer', i.e., it copies each character.....
-
Replied #Threads
help for writing compliers
For more details on Lex and YACC, refer forum thread #-Link-Snipped-# Also, look at the link <a href="https://www.thefreecountry.com/programming/compilerconstruction.shtml" targe...
-
Posted #Threads
Data Structure/Algorithm Challenger II
We have a doubly-linked-list with number of nodes unknown. Sometimes, while working with the list, it somehow gets corrupted. The corrupt node is pointing to some...
5 replies -
Replied #Threads
Data Structure/Algorithm Challenger I
Great work Sahana, good going. 😁 I had few more solution, but this is the most optimized option among that. The algorithm has a time complexity...
-
Replied #Threads
Data Structure/Algorithm Challenger I
Confusing , not at all. I got your point. Though its not necessary that the nodes of the list will be placed sequentially in the memory,...
-
Replied #Threads
Data Structure/Algorithm Challenger I
Good try Sahana. The approach should work, but will take more space and time during execution then the approach of Kidakaka as: 1. Using stack instead...
-
Replied #Threads
Data Structure/Algorithm Challenger I
Sorry for wrong interpretation of the solution Kidakaka. The approach should work. Just my few cents: 1. As we are using one more data structure, the...
-
Replied #Threads
just solve it!!!
Another approach that helps in optimizing other similar cases: Step 1: Take 3-3 coins randomly and put on either side of the balance. This will give...
-
Replied #Threads
Data Structure/Algorithm Challenger I
kidakakaTraverse the linked list until you do not come to the end of the List (Null pointer).Consider the case when there is a circular path, in...
-
Posted #Threads
Data Structure/Algorithm Challenger I
We have a singly-linked-list with number of nodes unknown. Sometimes, while working with the list, it somehow gets corrupted. The corrupt node is pointing to some...
11 replies -
Replied #Threads
Does any one has idea about Selenium(Automation Tool)
Hi Archana, You can give OpenSTA a try. OpenSTA is an ideal toolset for automation and performance testing of web applications. It support record play mode...
-
Replied #Threads
download link for mercury loadrunner
Open the link #-Link-Snipped-# and then open the link for HP LoadRunner 9.0 Windows Evaluation present on the above page. You will need to register there...
-
Replied #Threads
Hide your folder without any SOFTWARE
Nice post Kanu. Just some additional information: The batch file basically renames the folder with name abc to abc.{21EC2020-3AEA-1069-A2DD-08002B30309D}. So instead of writi...
-
Replied #Threads
linux language development tools
Hi Mahul, Check out the link #-Link-Snipped-# for more details on compiler construction (especially on tools lex and yacc). I would recommend book O'Reilly - Lex...
-
Replied #Threads
Problem: One line code to execute if && else statements simultaneously
DEPgive me a one line code to execute if && else statements simultaneously. dont use a ; after else statement !!!😒 So your question is to...
-
Replied #Threads
Mayank's C/C++ Challenger - IV
A more optimized and simple solution 😉: void printbits(int num) { for(unsigned int i = ~(((unsigned int)-1)/2); i; printf("%d", num&i ? 1 : 0), i /=...
-
Replied #Threads
Mayank's C/C++ Challenger - IV
Some text was converted to smilies. So here is the edited code. void printbits(int num) { for(int i=1, int j=1; (i|j)!=0; (i&&j) ? (i=((j=i)<<1)) : (j...
-
Replied #Threads
Mayank's C/C++ Challenger - IV
Here comes a solution :smile:: void printbits(int num) { for(int i=1, int j=1; (i|j)!=0; (i&&j)?(i=((j=i)<<1))😔j?(j=((i=j)&0)):1), j?1😛rintf("%d",(num&i)?1:0), j?1😔i=((i>>1...
-
Replied #Threads
Try The 'C' Code !
/* 1st Way: Change i in i-- by n*/ int i, n = 20; for (i = 0; i < n; n--) { printf("X"); } /*...
Activity by month
Where pradeep_agrawal contributes
-
#Threads 200 · 100%
Highlights
- Reactions per contribution
- 0.0
- Best answers
- 0
- Member for
- 20 years