MySQL substring function

MySQL Cluster

MySQL SUBSTRING() returns a specified number of characters from a particular position of a given string. Syntax: SUBSTRING(str, pos, len) or SUBSTRING(str FROM pos FOR len) Arguments Name       Description str              A string. pos             Starting position. len         … Read more

! the logical operator not in C

C Programming Tutorial

In this article we will learn about the NOT operator, written as !. This operator reverses the result of the expression it operates on. For example, if the expression evaluates to a non-zero value, then applying ! operator to it results into a 0. Vice versa, if the expression evaluates to zero then on applying … Read more

IES Preparation Tips

IES-EXAM

As far as preparation for IES is concerned, it differs from person to person and how much they are confident with the basics of every topic. I recommend that you go through the past year papers and analyze them thoroughly. Find out the kind of questions that need the most work. You definitely need to … Read more

C Program to calculate the salary

C Programming Tutorial

Problem Statement: Write a program to calculate the salary as per the following table: Solution: /* C program to calculate salary */ main( ) { char g ; int yos, qual, sal ; printf ( “Enter Gender, Years of Service and Qualifications ( 0 = G, 1 = PG ):” ) ; scanf ( “%c%d%d”, &g, … Read more

Logical Operator in C

C Programming Tutorial

C allows usage of three logical operators, namely, &&, || and !. These are to be read as ‘AND’ ‘OR’ and ‘NOT’ respectively. There are several things to note about these logical operators. Most obviously, two of them are composed of double symbols: || and &&. Don’t use the single symbol | and &. These … Read more

Nested if else in C

C Programming Tutorial

It is perfectly all right if we write an entire if-else construct within either the body of the if statement or the body of an else statement. This is called ‘nesting’of ifs. Let’s have an example: /* A quick demo of nested if-else */ main( ) { int i ; printf ( “Enter either 1 … Read more

Changing a file’s Date Created and Last Modified attributes in linux

Linux yum

Easiest way – accessed modified will be the same: # touch -a -m -t 201512180130.09 fileName.txt Where: -a = accessed -m = modified -t = timestamp – use [[CC]YY]MMDDhhmm[.ss] time format If you wish to use NOW just drop the t and the timestamp You can add *.txt file to change the attributes of all … Read more