R4R
Right Place For Right Person TM
R4R C C FAQs C Interview Questions and Answers

 


Totel:206 Click: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42

C Interview Questions And Answers

Page 1

Questions 1 Which of the following is the structure of an if statement? 

A.  if (conditional expression is true) thenexecute this codeend if 
B.  if (conditional expression is true)execute this codeend if 
C.  if (conditional expression is true)   {then execute this code>->}
D.  if (conditional expression is true) then {execute this code}

Answer
d

Answer
B

Questions 2 string constants should be enclosed with 
a.single quotes
b.double quotes

Answer
double quotes

Answer
b

Answer
b).double quotes

Answer
b).double quotes

Answer
b.double quotes

Answer
double quotes

Answer
double quotes

Questions 3 What is C?

Answer
c is super set of all language

Answer
c is a structured programing language

Questions 4 write a c program to accept a number between 3 & 10 & print a square of stars. 
if user enters 4 the output should be as shown ****
                                               *  *
                                               *  *
                                               ****

Answer
#include <stdio.h> main() { int count; printf("\n**************"); for( count = 1 ; count <= 8 ; ++count) print f("\n* *"); printf("\n**************\n"); }

Answer
#include<stdio.h> #include<conio.h> void main() { int row,i,j,k; printf("enter the no of row::"); scanf("%d",&row); for(i=0;i<row;i++) { if(i==0||i==row-1) { for(j=0;j<row;j++) printf("*"); } else { for(j=0;j<row;i++) { if(j==0||j==row-1)printf("*"); else printf("*"); } printf("\n"); } getch(); }

Answer
#include <stdio.h> void main() { int count,a; printf("\n-------------------------\n"); printf("\n enter the number="); scanf("%d",&a); if(9<a>2) { for( count = 1 ; count <= a ; ++count) print f("\n* "); } else printf("number must be in between 3 to 8"); printf("\n-------------------------\n"); }

Questions 5 Is that possible to pass a structure variable to a function/ If so,explain the detailed ways?

Answer
yes it is possible to pass structure variable to a function struct emp { int eno; }; void disp(struct emp e) { printf(e.eno); } void main() { struct emp e; e.eno=10; disp(e); }

Answer
We can pass a structure variable to a function. for that a variable of type structure is taken as argument in fn and structure variable is passed in fn call.


Goto Page:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
Share |

C Objective Questions And Answers

C Objective Questions And Answers

C Interview Questions And Answers

C Subjective Questions And Answers


R4R,C Objective, C Subjective, C Interview Questions And Answers,C,C Interview,C Questions ,C Answers

New Updates

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R