C Interview Questions
Questions Answers Views Company eMail

#define MAX 3 main() { printf("MAX = %d \n",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif

IBM, Vector,

4 26891

main() { int l=6; switch(l) { default:l=l+2; case 4:l=4; case 5:l++; break; } printf("%d",l); }

1 3360

1 1 12 21 123 321 12344231 how i creat it with for loop??

1 3104

12344321 123 321 12 21 1 1 how i print this program??

DSR Management, Winit,

5 17576

how to swap 4 number without using temporary number?

2 4039

write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

Wipro,

2388

a c code by using memory allocation for add ,multiply of sprase matrixes

2266

#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }

Vector India,

1 3712

main() { int a[3][4] ={1,2,3,4,5,6,7,8,9,10,11,12} ; int i, j , k=99 ; for(i=0;i<3;i++) for(j=0;j<4;j++) if(a[i][j] < k) k = a[i][j]; printf("%d", k); }

Vector, Wipro, Zoho,

4 22955

main() { enum _tag{ left=10, right, front=100, back}; printf("%d, %d, %d, %d", left, right, front, back); }

Accenture, Vector,

1 8813

 Illustrate it   summing the series 2+4+6+......to n terms using  (i) while loop (ii) do-while loop

2 4493

write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values.  The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.

2670

 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

1702

main() { int age; float ht; printf("Enter height and age"); scanf("%d%d",&height,&age); if((age<=20)&&(ht>=5)) {printf("She loves you");} else {printf("She loves you");} }

2 3683

Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

1573


Post New C Questions

Un-Answered Questions { C }

When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

776


What is non linear data structure in c?

546


What are pointers in C? Give an example where to illustrate their significance.

720


what is ur strangth & weekness

1785


What is structure in c explain with example?

611






What are the preprocessor categories?

610


Why does this code crash?

594


What is function and its example?

600


How is null defined in c?

631


Explain what are reserved words?

614


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

1601


What are the main characteristics of c language describe the structure of ac program?

573


Whats s or c mean?

569


What is calloc()?

602


Which control loop is recommended if you have to execute set of statements for fixed number of times?

783