Skip to content

Tag Archives: secure-coding

In C, fseek() should be preferred over rewind(). Note the following text C99 standard: The rewind function sets the file position indicator for the stream… Read More
Deleting a derived class object using a pointer of base class type that has a non-virtual destructor results in undefined behavior. To correct this situation,… Read More
Ideally delete operator should not be used for this pointer. However, if used, then following points must be considered. 1) delete operator works only for… Read More
exit() void exit ( int status );  exit() terminates the process normally. status: Status value returned to the parent process. Generally, a status value of… Read More
Consider the below program.  C void read() {    char str[20];    gets(str);    printf("%s", str);    return; } The code looks simple, it reads string from standard input… Read More