Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
85% Quality Score
Upvotes Received
5
Posts with Upvotes
5
Upvoting Members
4
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
~21.9K People Reached
About Me

Developer, Engineer, Embedded Developer

Interests
Programming, Embedded System, Linux opensource Driver Developments, Computer Games, Chess Engines
PC Specs
Macbook Pro retina 13.3', Debian 7.7 Home PC quad-core AMD, 8 GB, 500GB
Favorite Tags

27 Posted Topics

Member Avatar for Mayukh_1

I have inputs in the form like below Data: 01 18 01 23 45 67 89 AB CD EF FE DC BA 98 76 54 32 10 01 23 45 67 89 AB CD EF 02 18 67 89 AB CD EF FE DC BA 98 76 54 32 10 …

Member Avatar for Gribouillis
0
341
Member Avatar for Mayukh_1

I have a text file in the form like below sourceFiles { hello.cpp, hi.cpp, main.cpp, } headerFiles { hello.h, hi.h, } path { source [ what, how, which, ] header [ include, inc, head, ] } I need to populate several lists from this text file. So far I have …

Member Avatar for jacks009
0
430
Member Avatar for Mayukh_1

I have a small snippet. It is related with several malloc statements. Can somebody please explain. #include <stdio.h> #include <stdlib.h> int main(){ char* ptr1 = (char*)malloc(10); free(ptr1); char* ptr2 = (char*)malloc(10); free(ptr1); char* ptr3 = (char*)malloc(10); free(ptr1); return 0; } **What will happen to the snippet..? Will the malloc for …

Member Avatar for rubberman
0
127
Member Avatar for ~s.o.s~

1. Implement vector library of C++ in C..USE ONLY integer DATATYPE **(Easy)** 2. Write the most efficient program to print Fibonacci values up to the value given during runtime and also store the values in a data structure to use it later..your code has to be very memory efficient and …

Member Avatar for gyno
22
7K
Member Avatar for Mayukh_1

Can you please explain the reason of the garbage output instead of the each words in the string.. #include <stdio.h> #include <string.h> #include <stdlib.h> int count = 0; //char** memptr = NULL; char** push(char* word, char** memptr){ if(count > 1) memptr = (char**)realloc(memptr, (count * sizeof(char*)) ); memptr[count - 1] …

Member Avatar for JohnMcPherson
0
116
Member Avatar for bharat_3

Different compilers behave differently..Don't f#ck yourself up for something which depends on something called order of evaluation. [Click Here](http://en.cppreference.com/w/cpp/language/eval_order) give problems that are bit genuine

Member Avatar for shajin c l
0
196
Member Avatar for aravindm

The real essence of elegant programming is not to rely on order of evaluation..Moreover use gdb to debug the code by creting multiplr in-line breakpoint in the printf statement..

Member Avatar for Moschops
0
201
Member Avatar for aravindm

Use this logic.. Sorry this code is in python not in c...but you can understand the logic number = 123134254 reverse = 0 while number > 0: reverse = (reverse * 10) + (number % 10) number /= 10 b = 0 answer = 0 while reverse > 0: a …

Member Avatar for Mayukh_1
1
156
Member Avatar for Mayukh_1

I have made this code. It is working good. Can anyone please help me to make it more optimised? Here is the code. /* ∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑ Author: Mayukh Sarkar Email: mayukh2012@hotmail.com Country: India License: GPL public Copyright ® © ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ */ #include <stdio.h> #include <stdlib.h> static int size = 0; typedef …

Member Avatar for David W
0
139
Member Avatar for Genius11

Please metion the error..Is it some runtime or compile time errors..If it is some run time error then plese check for the segmentation faults or if the the output is what you have desired or not. But if it has some compile error, gives us the line number. Your code …

Member Avatar for Mayukh_1
0
357
Member Avatar for sfwr

In the 1st option the answer can be fetched properly..of course you will have a lvalue error because you `++` & `=` operator is not arranged properly. Do this & check `(unsigned char*)dest++` and then `*((unsigned char *)dest) = c;`

Member Avatar for Mayukh_1
0
682
Member Avatar for masaker

Firstly, Indent your code properly dude.. Secondly, if you are using c++, why using Link List, thats not the conventional C++ style..Use vector of class datatype instead of structure..Vector library provides several method to operate on the database. Lastly, Use these above mentioned principle to implement the homework by yourself. …

Member Avatar for David W
0
2K
Member Avatar for ms95

You probably cannot do it because linking the function implementions are the part of the linker & not the compiler. The functions are implemented in the appropriate headers & when you include them, linker links those definitions..Once the execuatble is prepared, there is no way you can include those headers …

Member Avatar for Mayukh_1
0
300
Member Avatar for danibootstrap

First decide which encoding format you want..(WAV is the obvious choice always) Second read that how data is encoded in that format. Implement that encoding format in your C program Write data into a file in that encoded format from that C program & with .wav extention Finally write a …

Member Avatar for Mayukh_1
0
198
Member Avatar for alexx006

If you cannot use any C++ STL container, then what's the point of using c++ ? I would prefer vector insead of link list in c++

Member Avatar for Schol-R-LEA
0
296
Member Avatar for new_developer

for C++ use `std::string a` instead. And instead of strlen use `a.size()`, to parse the data from the string, use `a.substr(int index, int noOfBytes)`

Member Avatar for Mayukh_1
0
230
Member Avatar for vijaykrishnabor

You may do it anyway but internally when opcode is generated, it always takes a temp memory for temporary storage. Moreover memory overload problem can always create problem for two large numbers. Swapping two variables using a third variable is hence always better.

Member Avatar for Mayukh_1
-1
7K
Member Avatar for siddy

By console color if you mean, the output of the code will be in different color then try this **file: color.h** #include <ostream> namespace Color { enum Code { FG_BLACK = 30, FG_RED = 31, FG_GREEN = 32, FG_YELLOW = 33, FG_BLUE = 34, FG_MAGENTA= 35, FG_CYAN = 36, FG_DEFAULT= …

Member Avatar for vegaseat
0
164
Member Avatar for Mayukh_1

Hello guys can anyone please help me in a problem relating to file. The problem is that I want to use `fgets` on a c file from another c file and increment a the counter every time to get the number of lines and I also want to put the …

Member Avatar for David W
0
200
Member Avatar for Clearner123

just type in the terminal `time EXE_NAME` and it will give you the runtime..the manpage of time looks like this TIME(1) BSD General Commands Manual TIME(1) NAME time -- time command execution SYNOPSIS time [-lp] utility DESCRIPTION The time utility executes and times utility. After the utility finishes, time writes …

Member Avatar for Mayukh_1
0
328
Member Avatar for Ku Nj
Member Avatar for Mayukh_1

Hey is there anybody who works with SDCC to make projects for 8051 microcontroller series on Macbook. If yes then can you please post the working make file, specially the part which loads the program in the device. I am confused what to write specifically with the program tag in …

Member Avatar for Mayukh_1
0
762
Member Avatar for Mayukh_1

Please explain when this error occurs.. duplicate symbol _Firstdata in: list.o main.o ld: 1 duplicate symbol for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Member Avatar for Mayukh_1
0
131
Member Avatar for Mayukh_1

I have a small program for Linklist in C.. ** linklist.h** // // linklist.h // LinkList // // Created by Mayukh Sarkar on 17/04/15. // Copyright (c) 2015 Mayukh Sarkar. All rights reserved. // #ifndef __LinkList__linklist__ #define __LinkList__linklist__ struct LinkList{ int Data; struct LinkList* NextData; }; struct LinkList *Firstdata = …

Member Avatar for rubberman
0
236
Member Avatar for Mayukh_1

Why the following code is giving me an error like this `make: *** [all] Segmentation fault (core dumped)` the source code is like this #include <stdio.h> int main() { int i; char* ptr = NULL; *(ptr + 0) = 'H'; *(ptr + 1) = 'e'; *(ptr + 2) = 'l'; …

Member Avatar for deceptikon
0
155
Member Avatar for Mayukh_1

I have these files.. **str.h** #ifndef _str_h_ #define _str_h_ struct STRSTR { char* MainStr; char* SubStr; }; char* str_str(int, int, struct STRSTR* sample); void init(char*, struct STRSTR* sample); #endif /* _str_h_ */ **str.c** #include "str.h" #include <stdio.h> void init(char* str, struct STRSTR* sample){ sample->MainStr = str; } char* str_str(int index, …

Member Avatar for Mayukh_1
0
312
Member Avatar for Mayukh_1

**Okay this is my first post and I am quite excited that how it will be recieved by the community. I have a long experience in C++ programming but never been a part of any community hence I believe that as a tyro, my mistakes will be ignored.** This post …

Member Avatar for NathanOliver
0
308

The End.