C Interview Questions
Questions Answers Views Company eMail

can any one tell that i have a variable which is declared as static but i want this variable to be visible to the other files? how?

2 2463

what is diffrence between string and character array?

1 2522

GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA

744




i want to asked a question about c program the question is: create a c program that displays all prime numbers less than 500? using looping statement

5 4126

what is the value of b if a=5; b=++a + ++a

Infosys, TCS, Tech Mahindra,

28 21335

Write a c program to find, no of occurance of a given word in a file. The word is case sensitive.

2 6029

create a C program that displays one z,two y's,three x's until twenty six A's. plzz answer i need it tomorrow.

4 2634

what will be the output for the following program? main() { char ch = 'k'; char c; printf("%c",c); }

3 3090




union { char ch[10]; short s; }test; test.s = 0xabcd; main() { printf("%d",ch[10]); }

3 2878

extern static int i func() { i =10; i++; printf("%d \n",i); } main() { i =20; printf("%d \n",i); func(); printf("%d \n",i); }

2 3428

Write a program to display the no of bit difference between any 2 given numbers eg: Num1 will 12->1100 Num2 will 7->0111 the difference in bits are 2.

4 2854

A.C func() { pritnf(" in fuction %d",MACRO); } MAIN.c testfunc() { #define MACRO 10 printf("in test function %d", MACRO); } main() { printf("in main %d",MACRO); func(); testfunc(); getch(); }

Wipro,

2 2382

typedef struct { int i:8; char c:9; float f:20; }st_temp; int getdata(st_temp *stptr) { stptr->i = 99; return stptr->i; } main() { st_temp local; int i; local.c = 'v'; local.i = 9; local.f = 23.65; printf(" %d %c %f",local.i,local.c,local.f); i = getdata(&local); printf("\n %d",i); getch(); } why there there is an error during compiling the above program?

1 5344

Can i use Two or More Main Funtion in any C program.?

4 5165

Why the below program throughs error during compilation? #include #include enum { ZERO, ONE, TWO, }; main() { printf("%d",&TWO); getch(); }

2 2096


Post New C Questions






Un-Answered Questions { C }

a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.

2762


write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

908


write a program to copy the string using switch case?

1699


what is bit rate & baud rate? plz give wave forms

819


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

1998






`write a program to display the recomended action depends on a color of trafic light using nested if statments

930


how many errors in c explain deply

913


how logic is used

795


why programs in c are running with out #include? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }

514


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.

1572


One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.

1403


can anyone please tell about the nested interrupts?

931


Explain output of printf("Hello World"-'A'+'B'); ?

245


WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..

859


What is your favorite subject?

184