We're back with this month's edition of Go4Expert's Newsletter. We hope you enjoy it and pass on the word to your buddies. As always, we'd love to know what you would like to see in upcoming newsletters and we welcome you to submit your feedback.
Solution to Problem When using scanf() before fgets() or gets() in C
There are a certain functions in C, which if used in a particular combination may cause problems. These problems are due to the conflicting behaviors of the functions. In this article, we will understand the problem caused by using one such combination of functions scanf() and fgets()/gets().
...
Read more...
Understand feof() function In C
The other day I was working on a code where in I was doing some file related operations. I used the function feof() to test whether the end of file has been reached or not. I got into some trouble over the way I used this function in my code, after debugging a bit I found the problem. The problem...
Read more...
Why main() should not have void as return type?
The motivation behind writing this article came from the fact that there are still many books/tutorials/softwares etc where I have seen 'void main' being used instead of 'int main'. Still most of the C/C++ newbies are taught to start practice coding with 'void main'. Even I started practicing C in...
Read more...
GCC:: Calling Function With Same Name But Different Return Type
After writing Why main() should not have void as return type? article the other day, suddenly one more question came up into my mind about the signature of main() function. In the earlier article I discussed about why 'void main()' should not...
Read more...
Understanding Stack Corruption With C examples
If you are an experienced C/C++ programmer then you must have definitely observed some weird behaviors of code in certain situations. These weird behaviors can be due to various reasons but most of them are because of stack corruption. For all those who have no idea about what stack corruption is,...
Read more...
Introduction to JSON in Perl
JSON has become a popular data representation format, and can been seen as the successor of XML which used to be the most popular format used for data exchange between systems. Notable examples of JSON being used for data representation are...
Read more...
Reasons For Segmentation Fault In C
There are times when you write a small or a big code and when you execute it you get a very small and precise output 'Segmentation fault'. In a small piece of code its still easy to debug the reason for this but as the code size grows it becomes very difficult to debug. Here in this article, I am...
Read more...
Using extern "C" to call C function from C++ and vice versa
Being an experienced C/C++ developer, sometimes there are modules in which the code layer which interact with the system is written in C while the layer above it is written in C++. Have you ever thought of how these two layers (one written in C and other in C++) interact? What if we want to call a...
Read more...
Why Avoid Comparison of signed value with unsigned value in C
If you work 3-4 hours daily on coding in C/C++ then there ought to be some programs, logics, tricks, tips etc which you come across daily. Some are new to only you while others are interesting enough to be shared. Here in this article, I am going to share one interesting program and how I went...
Read more...
Understanding Volatile Variable in C
As the name suggests, volatile specifier indicates the compiler that the value of the variable is volatile i.e. it can change unexpectedly. But, the question comes why do we need to even specify that a variable value is volatile.
The Requirement for volatile specifiers
Our compilers...
Read more...
Virus Code in Linux - C Code That Changes it's Process Name Run Time
The other day I was searching a bit on Linux viruses on Internet. Though there are quite a few now but still cannot be compared with the volumes that we have on windows. Another thing that I found was the permission robustness that Linux file system has as compared to windows OS. So, whiling...
Read more...
Understanding File Handling Functions in C
Being a Linux system programmer there are numerous situations when one needs to deal with files kept on disk. Like opening a file, reading a file(one character at a time, one line at a time, the whole file at a time), seeking in a file and then finally closing it. One can use various library...
Read more...
Understanding Advance File Handling Functions in C
Continuing my previous article Understanding File Handling Functions in C, here in this article let us focus on functions like :
fread() // read a chunk of data from file
fwrite() // Write a chunk of data to file
feof() // Check for...
Read more...
Virus in Linux - C Code That Changes it's Process Name and its Process ID at Run Time
After writing my previous article Virus Code in Linux - C Code That Changes it's Process Name Run Time, I wondered if a process can change its name then why cannot it change its PID. And what if a process can change both its name and PID...
Read more...
How to Create Obfuscated Code In C
Most of the newbie programmers are fascinated by the term 'hacking' or 'cracking'(to be precise). Generally, they see some weirdly written code (that may visually seem like a painting to any new programmer) and start dreaming of the developer who has written the code as god of programming or...
Read more...
Digging C malloc() & free()
malloc allocates certain amount of memory during program execution and free de-allocates memory previously allocated using a call to functions like malloc, calloc or realloc. Memory leak can occurs when a program allocates memory but does not release it.
[Mark=]Understanding malloc() &...
Read more...
|
Community Stats
+ 1,852 New Members
+ 164 New Threads and Articles
+ 1,964 New Posts and comments |
Subscribe via RSS
Get live updates in your web browser window. |
Follow us on Twitter
Are you on Twitter? Follow us and get updated. |
Find us on facebook
Share Go4Expert with your buddies on facebook. |
Unsubscribe
If you no longer wish to receive this newsletter or want to edit your preferences you can do it here. | |