C program to indent source code

My goal is to write a C program that indents the C code given in char *input. The style of one level of indentation is given in the string const char *pad. I've wrote the following code, which works find in my head but doesn't in practice. There must be a mistake somewhere, but I can't find it. Also, I can't figure out why Valgrind doesn't like the line containing while(...). Invalid read of size 1...

Any { increases the indentation level by one, and any } decreases the indentation level by one. No other indentation rules are applied. I assume there are no curly brackets inside string literals.

I need to fix and edit the code so it works with files., the code is not compelete.

Skills: C++ Programming, C Programming, Software Architecture, C# Programming, Algorithm

See more: clinic program vb6 source code, login process program java source code, program connect source code, rmi program java source code, java program database source code, windows desktop program launcher source code visual studio, cpu scheduling program java source code, deck cards program compiles source code, paint program opengl source code, geolocation program delphi source code, glut program helicopter source code, write a c program to accept 10 or more numbers then display the numbers in two columns one column with the numbers as they were , write a c++ program to accept 10 or more numbers then: display the numbers in two columns: one column with the numbers as they w, c c++ c# c++ games with source code, decompile exe program into source code, c# project management source code, c projects with source code and documentation, project in c language with source code pdf, c++ chess engine source code, c++ projects with source code and output

About the Employer:
( 0 reviews ) NIZHNII NOVGOROD, Russian Federation

Project ID: #30163923

15 freelancers are bidding on average $51 for this job


Hi, I'm an experienced C programmer, I have implemented lexical parsers, syntax checkers and compilers. With my experience, I can explain to you what mistakes you have in your code, and provide you with techniques and More

$100 USD in 1 day
(29 Reviews)

Hello, I am expert C/C++ programmer ready to fix it . I can start your work right away. Please contact me. Thank you Regards, Bilal

$70 USD in 1 day
(55 Reviews)

Hi That's not an automated bid, I have read the task I'm completely sure you need something like lex+yacc for this task Если вы действительно из России, может по-русски обсудить

$100 USD in 7 days
(12 Reviews)

Hi ,I am a C programmer.I can do you C program for parsing in a day or two. Please feel free to chat.

$30 USD in 2 days
(15 Reviews)

Hi! I am an expert C & C++ programmer and have written numerous projects in both of these languages, personal projects as well as many freelance projects (on and off I can write this indent function More

$20 USD in 1 day
(12 Reviews)

Hi I'm an experienced C developer I'll help you solve this problem perfectly. I hope your kind reply. Best Regards.

$40 USD in 2 days
(2 Reviews)

Hi I have read your description. I think it requires to read the input and apply stack based indentation based on curly braces encountered. I think I can help you with your task. Please DM for more details about the ta More

$67 USD in 1 day
(6 Reviews)

Hello! I have good experiences like your project. I have read your all description carefully and I understand your requirement. So I think I can deliver you good result. Thanks. Best regards. https://www.freelancer.c More

$200 USD in 3 days
(7 Reviews)

Hi, there. I have read your project description very carefully so I had confidence that I can do it.. I have experience over 5 years with the skills you required. If you want to me to complete project, then I will work More

$20 USD in 7 days
(6 Reviews)

I am an expert programmer with +5 years of programming experience. I can finish you code in no time if you give me the full details.

$40 USD in 2 days
(1 Review)

Hi, dear client! I'm so happy to bid on this interesting project. I have read your requirements carefully and feel confident to finish this task well in tight deadline. I hope to discuss more detail. Thank you https:/ More

$20 USD in 1 day
(6 Reviews)

Hello. I have studied your requirements carefully and I think I can fulfill your task. I have 9 years of c# development experience. I am familiar with php、wordpress. SQL、、mvc、.net core、 html、 css、 jquery、 Ja More

$20 USD in 2 days
(5 Reviews)

Hi, I can give it to you right now. Just about the time to clean it a bit. I changed you algorithm a little. You can see the result in my portfolio pictures (first left I think). I wait for you in the chat, if you de More

$10 USD in 1 day
(3 Reviews)

Hello there, I think i might be the guy you are looking for. I've been working with C for 5 years and this is a basic file operation so i think i can handle this pretty well, if you decide to go with me, i will deliver More

$20 USD in 1 day
(0 Reviews)

- previous experience in such topics; - eager to discuss a lot in this chat stream; - degree stats / maths;

$10 USD in 1 day
(1 Review)