Featured post

Math : Diffusion Equation or Heat Equation

Diffusion equation at finite rod, Semi-infinite rod and infinite rod have been discussed. Thank you. Feel free to comment.

8/15/2019

SOME GOOD BOOK ON MATHEMATICS

Real Analysis - Methods of Real Analysis by Richard R. GoldbergLinear Algebra - Linear Algebra by Promode Kumar SaikiaAbstract Algebra - Contemporary Abstract Algebra by J. A. GallianComplex Analysis - Foundations of Complex Analysis by S. PonnusamyODE - Differential Equations With Historical Notes by George F SimmonsPDE - Elements of partial differential equations by Ian Sneddon


Thank you.

8/14/2019

CSIR UGC NET JUNE 2019 RESULTS DECLARED

CSIR UGC NET June Results 2019: The Council of Scientific and Industrial Research (CSIR) on Wednesday released the result for Joint CSIR-UGC examinations.

The CSIR-UGC exam for Junior Research Fellowship (JRF) and lectureship was conducted in June this year.

As per reports, as many as 3860 candidates have been qualified for JRF (NET) CSIR, where as 1969 candidates have made it to JRF (NET) UGC.

Here’s How To Check CSIR UGC NET June Result 2019

Visit the official website of CSIR: csirhrdg.res.in.

Click “JOINT CSIR-UGC NET Exam June 2019 Result”.

Scroll down the PDF to check your roll number and rank.

Download your result and take out a print out for future use.

NOTE: Candidates who have qualified for JRF are also eligible for the jobs of lectureship.

Subscribe to updates

8/13/2019

Job recruitment : DRDO scientist for graduate and PG students


DRDO Recruitment 2019: Online application process begins for 290 posts. Check vacancy details, fees, eligibility, documents required


DRDO Recruitment 2019: Online application process begins

India TV News Desk New Delhi August 12, 2019 9:14 IST


Advertisement 


DRDO Recruitment 2019: Want a job with DRDO? Here's your chance. DRDO has begun online application process for at least 290 posts/jobs as part of DRDO Recruitment 2019 in the Defence Research and Development Organisation - Recruitment and Assessment Centres (RAC) on drdo.gov.in. Online applications for DRDO Recruitment 2019 have been invited from graduate engineer and postgraduates in Science including students who have appeared in the final year examination through RAC website - rac.gov.in. The DRDO Recruitment is for the posts of Scientist 'B' (including Backlog vacancies of OBC/SC/ST), Scientist 'B' in Department of Science and Technology (DST), Scientist/Engineer 'B' in Aeronautical Development Agency (ADA), and Executive Engineer in Gallium Arsenide Enabling Technology Centre (GAETEC)


DRDO Recruitment 2019: Vacancies, DRDO jobs, posts

Electrical Engineering: 12
Aeronautical Engineering: 14
Mathematics: 3
Metallurgy: 12
Material Science: 1
Civil Engineering: 8
Geology-01
Instrumentation Engineering: 1
Textile Engineering: 1
Production/ Industrial Production Engineering: 1
Food Science: 1
Electronics & Comm. Engineering: 78
Mechanical Engineering: 59
Computer Science & Engineering: 46
Based on GATE 2017/2018/2019
Chemical Engineering: 4
Chemistry: 5
Physics: 3

DRDO Recruitment 2019: Educational qualification, eligibility

Electronics and Communication Engineering: Candidates must have at least first class Bachelor's degree in Engineering or Technology in Electronics and Communication Engineering from a recognised university or equivalent. 

The candidates must also fulfil one of these additional requirements:

GATE Qualification: They should have a valid GATE score in Electronics and Communication Engineering. 80 per cent aggregate marks required in EQ degree from an IIT or NIT. 

Advertisement 

Mechanical Engineering: At least first class Bachelor's degree in Engineering or Technology in Mechanical Engineering from a recognised university or equivalent required. 

DRDO Recruitment 2019: Documents required

Self-attested certificates regarding Date of Birth
Qualification certificates with mark sheets
Recent passport size colour photograph

Application fee for DRDO Recruitment 2019:

All male candidates under General, EWS, OBC categories are required to pay a nonrefundable application fee of Rs 100. There is no fee for SC/ST/PWD and women candidates.

8/12/2019

8/10/2019

Ugc to university

hupdated the recruitment of faculty in universities, colleges and institutions deemed to be universities. Earlier a letter was issued about the application process on July 31, 2019. All the universities and its affiliated colleges were requested to upload the details of all the vacant posts, along with the reservations and advertisement details on the online portal http://nherc.in.e University Grant Commission, UGC, has

8/08/2019

C programming question in interview

1) What are the key features of C programming language?


C is a platform-dependent language.


C offers the possibility to break down a large program into small modules.


Also, the possibility of a programmer to control the language.


C comes with support for system programming and hence it compiles and executes with high speed when compared to other high-level languages.


2) What happens when you compile a program in C? (tricky question)

Whenever you compile a program in C, a multi-stage process takes places. The process is as shown below. Click here to know the complete process & function of compiler, assembles, linker and loader in this process.

3) What is the use of header files in C?

Header files contain the definitions and set of rules of the functions being used in the programs.

For example, when you use printf() or scanf() in your program, you nee to include stdio.h library function. Else your compiler will show an error. This is because, the standard input and output functions printf() and scanf() are stored in this header file.

So similarly every header file stores a set of predefined functions which makes it easy to program.

4) What happens if a headerfile is included twice? (tricky question)

When the preprocessor sees a #include, it replaces the #include with the contents of the specified header. By using include guard(#), you can prevent a header file from being included multiple times during the compilation process. So basically, if a header file with proper syntax is included twice, the second one gets ignored.

5) Can a program be compiled without the main() function?

Yes, compilation is possible, but the execution is not possible. However, if you use #define, we can execute the program without the need of main().

For Example:

#include<stdio.h>    
#define start main    
void begin() {    
   printf("Hi");    
}

C Programming Interview Questions on Data Types, Variables & keywords

6) What are the basic data types in C?

Int – Used to represent a number (integer)


Float – Used to represent a decimal number


Double – Used to represent a decimal number with highest precision(digits after the decimal point)


Char – Single character


Void – Special purpose type without any value


7) Is it possible to store 32768 in an int data type variable? (Tricky question)

Int data type is capable of storing values between – 32768 to 32767. To store 32768 a modifier has to be used with int data type and hence Long Int can be used. If there are no negative values, unsigned int can also be used.

8) What are the various Keywords used in C?

There are 32 various keywords in C and each of them performs a defined function. These keywords are also called as Reserved words. Click here to know the functions of the below keywords.

9) What is the difference between static & global variables?

Global variables are variables which are defined outside the function. The scope of global variables begins at the point where they are defined and lasts till the end of the file/program. Whereas, static global variables are private to the source file where they are defined and do not conflict with other variables in other source files which would have the same name.

10) What is Memory Leak in C?

A memory leak occurs when programmers create a memory in the heap and forget to delete it. It decreases the efficiency of the performance of the system.

11) What is Static and Dynamic memory allocation?

Static memory allocation happens atcompile-time, and memory can’t be increased while executing the program. 


Whereas in case of dynamic memory allocation, this happens at runtime and memory can be increased while executing the program. 


Static memory allocation is used in arrays& dynamic memory allocation is used in Linked Lists.


Static memory allocation uses more memory space to store a variable.


 

C Programming Interview Questions on Operators, Input/output

12) What is the difference between ++a and a++?

‘++a’ is called prefix increment. First, the value stored in the variable ‘a’ gets incremented and then gets assigned to the same variable.  Whereas, ‘a++’ is called postfix increment. The value stored in the variable ‘a’ gets incremented after the execution of the particular line.

13) What is the difference between while (0) and while (1)?

While(1) is an infinite loop which will run till a break statement occurs. Similarly, while(2), while(3), while(255) etc will all give infinite loops only.

Whereas, While(0) does the exact opposite of this. When while(0) is used, it means the conditions will always be false. Thus, as a result, the program will never get executed. 

 

C Programming Interview Questions on Arrays, Strings, Pointers & Functions

14) What is a Dangling Pointer in C?

A pointer pointing to a dereferenced memory location is called dangling pointer. i.e. pointer pointing to the memory location which is deleted. There are three different ways where a pointer can act as a dangling pointer.

De-allocation of memory


When the local variable is not static


When the variable goes out of scope


To understand in detail, check this – Dangling pointer in c with examples

15) What is the difference between the Void and Null Pointer?

Null pointers generally do not point to a valid location.  A pointer is initialized as NULL if we are not aware of its value at the time of declaration. 

Whereas, Void pointers are general-purpose pointers which do not have any type associated with them and can contain the address of any type of variable. So basically, the type of data that it points to can be anything. 

>> Check out the detailed difference between null and void pointers.

16) What is the difference between Pass by value and Pass by reference?

In pass by value, changes made to the arguments in the called function will not be reflected in the calling function. Whereas in pass by reference, the changes made to the arguments in the called function will be reflected in the calling function. 

The below image will help you get a good understanding, however, click here to know the difference between Pass by value and Pass by reference in detail.

17) What is a pointer on a pointer in C programming language?

A pointer variable that contains the address of another pointer variable is called as a pointer on a pointer. For example, consider the following program.

int main()
{
    int v1 = 54;  
    int *pointer2; // pointer for var
    int **pointer1; // double pointer for ptr2
    pointer2 = &v1; // storing address of var in ptr2   
    pointer1 = &pointer2; // Storing address of ptr2 in ptr1     
    printf("Value of v1 = %d\n", v1);
    printf("Value of v1 using single pointer = %d\n", *pointer2 );
    printf("Value of v1 using double pointer = %d\n", **pointer1);
  return 0;
} 

18) Difference between malloc() and calloc() functions?

malloc and calloc are library functions that allocate memory dynamically, which means that memory is allocated during the runtimefrom the heap segment.

Malloc and Calloc differ in the number of arguments used, their initialization methods and also in the return values. Check out the detailed differences here.

19) What is the difference between Arrays and Pointers?

A few differences between Arrays and Pointers are:

An array is a collection of elements of similar data type whereas the pointer is a variable that stores the address of another variable. 


An array size decides the number of variables it can store whereas; a pointer variable can store the address of only one variable in it.


Arrays can be initialized at the definition, while pointers cannot be initialized at the definition.


>> Click here to know more differences

20) What is the difference between a structure and a Union?

All the members of a structure can be accessed simultaneously but union can access only one member at a time


Altering the value of a member will not affect the other members of the structure but where it affects the members of a union


Lesser memory is needed for a union variable than a structure variable of the same type


>> More details

 

C Interview Programs with Solutions

21) Write a program to print “hello world” without using a semicolon?

#include <stdio.h>      
void main()
{      
 if(printf("hello world"))
{
}}    

22) How to swap two numbers without the use of the third variable?

#include<stdio.h>          
main()      
{      
int a=1, b=8;  
printf("Before swapping a=%d b=%d",a,b);a=a+b;//a=30        
b=a-b;//b=10      
a=a-b;//a=20         
printf("After swapping a=%d b=%d",a,b); 
getch();      
}  

23) Program to reverse a given number in C

24) Program to print factorial of a number

25) Print Fibonacci series up to n 

26) Print all the prime numbers in a given range

27) Check if a given number is an Armstrong number or not.

28) Replace all 0’s with 1 in a given integer.

29) Pyramid pattern using stars

*
* *
* * *
* * * * 
* * * * *
* * * * * *           *
        *   *
      *   *   *
    *   *   *   *
  *   *   *   *   *
*   *   *   *   *   *

30) Reverse a string using recursion

Practice more C programming questions

Some videos on C Programming Interview Questions

Practice C, C++ and Java programming


Practice DS & Algorithms


C programming concepts


Data Structures & Algorithms concepts


C++ programming concepts


Java programming concepts


C Programming Interview Questions


Solved HackerRank Questions


For quick tips on programming, subscribe to our youtube channel. Click here to subscribe now

MOST VIEWED ARTICLES OF 2019

 

 Discussion Forum


 Home


 Courses


 Learning Centerexpand child menu


My Accountexpand child menu