C Interview Questions
Questions Answers Views Company eMail

write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?


what is printf

Satyam, MVSR,

5 3018

Write a program for print infinite numbers


3 5684

3. Program to print all possible substrings. ex: String S St Str Stri Strin String t tr tri trin tring r


3 20665

write a pgm to print 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1

3 3699

main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) { x=x+y; } y++; printf("The values of x and y are %d and %d."x,y); } What is the output?


5 4010

void main() {int i=2; printf("%d%d%d",i,++i,i++); getch(); }

9 2866

Input is "Jack and jill went up a hill" To print output is 1-letter word(s)-1 2-letter words-1 3-letter words-1 4-letter words-4

TCS, Mind Tree,

1 3929

Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.


what is stack , heap ,code segment,and data segment


How to swap 3 numbers without using 4th variable?

5 15681

write a program that will read the temperature in Celsius and convert that into Fahrenheit.

1 2991

write a program to print the one dimensional array.

1 3390

how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?


Is an array parameter is always "by reference" ?

1 1618

Post New C Questions

Un-Answered Questions { C }

You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.


C language questions for civil engineering


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)


what is reason of your company position's in india no. 1.


I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.


Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.


write a program to display all prime numbers


how to print the character with maximum occurence and print that number of occurence too in a string given ?


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


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.


Which is the memory area not included in C program? give the reason


To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9


write a program to find out prime number using sieve case?


The OS is a program that uses various data structures. Like all programs in execution, you can determine the performance and other behavior of the OS by inspecting its state - the values stored in its data structures. In this part of the assignment, we study some aspects of the organization and behavior of a Linux system by observing values of kernel data structures exposed through the /proc virtual file system. The /proc virtual file system: Linux uses the /proc file system to collect information from kernel data structures. The /proc implementation provided with Linux can read many different kernel data structures. If you cd to /proc on a Linux machine, you will see a number of files and directories at that location. Files in this directory subtree each corresponds to some kernel data structure. The subdirectories with numeric names contain virtual files with information about the process whose process ID is the same as the directory name. Files in /proc can be read like ordinary ASCII files. You can open each file and read it using library routines such as fgets() or fscanf(). The proc (5) manual page explains the virtual files and their content available through the /proc file system. Requirements in detail: In this part, you are asked to write a program to report the behavior of the Linux kernel. Your program should run in two different versions. The default version should print the following values on stdout: • Processor type • Kernel version • The amount of memory configured into this computer • Amount of time since the system was last booted A second version of the program should run continuously and print lists of the following dynamic values (each value in the lists is the average over a specified interval): • The percentage of time the processor(s) spend in user mode, system mode, and the percentage of time the processor(s) are idle • The amount and percentage of available (or free) memory • The rate (number of sectors per second) of disk read/write in the system • The rate (number per second) of context switches in the kernel • The rate (number per second) of process creations in the system If your program (compiled executable) is called proc_parse, running it without any parameter should print out information required for the first version. Running it with two parameters "proc_parse " should print out information required for the second version. read_rate represents the time interval between two consecutive reads on the /proc file system. printout_rate indicates the time interval over which the average values should be calculated. Both read_rate and printout_rate are in seconds. For instance, proc_parse 2 60 should read kernel data structures once every two seconds. It should then print out averaged kernel statistics once a minute (average of 30 samples). The second version of your program doesn't need to terminate.