What does this printf do? Not familiar with the question mark, colon, and extra NULL at the end.

printf("%s      ", row[i] ? row[i] : "NULL"); 

That format is called a ternary operator. It's a version of an if/else statement.
row[i] ? row[i] : "NULL"
is the same as

if(row[i]) {
    // use value row[i]
} else {
    // use value "NULL"
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.