C Interview Questions
Questions Answers Views Company eMail

Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

1676

Can you think of a logic behind the game minesweeper.

2097

Why is it important to memset a variable, immediately after allocating memory to it ?

1640

What is output of the following program ? main() { i = 1; printf("%d %d %d\n",i,i++,i++); }

CTS, Wipro,

9 7544

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

1844

write an algorithm to display a square matrix.

2312

How will you allocate memory to a double pointer ?

2 4071

how do you programme Carrier Sense Multiple Access

1599

how can make variable not in registers

TCS,

1 2496

what is d pitfalls of registers variables

TCS,

3 4426

what is the hardware model of CFG( context free grammar)

Microsoft,

2333

Define a structure to store the record of library. The record must consist of at least following fields: Title, Author, Edition, Price, Publisher, and Category. -Define functions authorSearch ( ), TitleSearch ( ) and CategorySearch ( ) to search a book with respect to author, title and category. [There can be more than one book, written by one author, in one category]

2 4159

what is bitwise operator?

IBM,

1 3019

what is c?

IBM, TCS,

4 4798

write a program to print data of 5 five students with structures?

1693


Post New C Questions

Un-Answered Questions { C }

Explain the properties of union.

697


How do you write a program which produces its own source code as output?

699


In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

835


What are the properties of union in c?

671


What is meant by preprocessor in c?

625






Explain what header files do I need in order to define the standard library functions I use?

728


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

730


What header files do I need in order to define the standard library functions I use?

618


Is it possible to initialize a variable at the time it was declared?

854


Write a code to generate divisors of an integer?

713


The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

1719


Write a program to check armstrong number in c?

727


What is the use of parallelize in spark?

646


disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

1729


Can the “if” function be used in comparing strings?

680