C Interview Questions
Questions Answers Views Company eMail

What will be printed as the result of the operation below: #include<..> int x; int modifyvalue() { return(x+=10); } int changevalue(int x) { return(x+=1); } void main() { int x=10; x++; changevalue(x); x++; modifyvalue(); printf("First output:%d\n",x); x++; changevalue(x); printf("Second output:%d\n",x); modifyvalue(); printf("Third output:%d\n",x); }

2 4894

1)which of following operator can't be overloaded. a)== b)++ c)?! d)<=

Siemens, CybOrg,

16 24383

2)#include main() { printf("Hello World"); } the program prints Hello World without changing main() the o/p should be intialisation Hello World Desruct the changes should be a)iostream operator<<(iostream os, char*s) os<<'intialisation'<<(Hello World)<

Siemens,

4 8849




6)swap(int x,y) { int temp; temp=x; x=y; y=temp; } main() { int x=2;y=3; swap(x,y); } after calling swap ,what are yhe values x&y?

3 14787

18)struct base {int a,b; base(); int virtual function1(); } struct derv1:base{ int b,c,d; derv1() int virtual function1(); } struct derv2 : base {int a,e; } base::base() { a=2;b=3; } derv1::derv1(){ b=5; c=10;d=11;} base::function1() {return(100); } derv1::function1() { return(200); } main() base ba; derv1 d1,d2; printf("%d %d",d1.a,d1.b) o/p is a)a=2;b=3; b)a=3; b=2; c)a=5; b=10; d)none 19) for the above program answer the following q's main() base da; derv1 d1; derv2 d2; printf("%d %d %d",da.function1(),d1.function1(),d2.function1 ()); o/p is a)100,200,200; b)200,100,200; c)200,200,100; d)none 20)struct { int x; int y; }abc; you can not access x by the following 1)abc-->x; 2)abc[0]-->x; abc.x; (abc)-->x; a)1,2,3 b)2&3 c)1&2 d)1,3,4

1 7039

write a program to swap bits in a character and return the value prototype of function char fun (char a, charb flag c) where fun returns a char, char a is a the value char b is the bit to be changed and flag c is the bit value for eg: x=fun(45,7,0) since 45 is 0010 0101 and ow x should contain the value 65 (0110 0101)

Bosch, College School Exams Tests,

1 4802

How to add two numbers without using arithmetic operators?

Infosys, TCS, Sapient, College School Exams Tests, e track, Pan Parag,

18 31480

how we can make 3d venturing graphics on outer interface

Microsoft,

1 2804




what is the defrenece between structure and union

Aloha Technology,

5 5439

Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor

TCS, TATA,

2125

What is volatile

2 3355

how to find the size of the data type like int,float without using the sizeof operator?

13 16477

what is the use of a array in c

6 3567

How to avoid structure padding in C?

Tech Mahindra,

7 44962

Why does not use getgh(); and in c language.

Elofic,

3 6656


Post New C Questions






Un-Answered Questions { C }

Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

2206


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

3002


what are # pragma staments?

837


Is Exception handling possible in c language?

834


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

1958






what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

744


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

804


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

219


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

884


we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?

68


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

1244


using for loop sum 2 number of any 4 digit number in c language

889


p*=(++q)++*--p when p=q=1 while(q<=6)

506


How to draw the flowchart for structure programs?

6553


i want to know the procedure of qualcomm for getting a job through offcampus

1224