By: Prem Tiwari | Last Updated: | In: C Programming Tutorial
Are you a C programming beginners, or just finished the learning of c programming language and looking for the job in c programming, then this tutorial will help you lot. Please keep your close attention in this tutorial as I am going to share some common c programming interview question with answers & example.
Question 1: What is c language?
Answer: Learn more about what is c programming language…
Question 2: How to write a c program to print “Hello world” without using any semicolon?
Answer: You can print the “Hello World” without using any semicolon with the help of if statement. See the below example:
1 2 3 4 5 6 7 8 |
#include<stdio.h> void main(){ if(printf("Hello world")){ } } |
Question 3: What is pointer in c programming language?
Answer: Learn about what is pointer in c language…
Question 4: How to swap two variables without using any third variable?
Answer: Learn about how to swap two numbers without using any third variable…
Question 5: What is NULL pointer in c language?
Answer: Null pointer is a special reserved value of a pointer in c language and it is used to indicate that the pointer doesn’t point to a valid location. see the below example:
1 2 3 4 5 6 7 |
int fun(int *ptr) { //Fun specific stuff is done with ptr return 20; } fun(NULL); |
Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies. View all posts by Prem Tiwari
Tags: c interview question, c interview question and answer, c program, c program examples, c program examples with output, c programming interview questions with answers, c questions for interview, interview questions c programming, interview questions on c with answers, programming interview questions