C Interview Questions
Questions Answers Views Company eMail

Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +

1 1666

how can i get output like this? 1 2 3 4 5 6


6 3383

what is the output of following question? void main() { int i=0,a[3]; a[i]=i++; printf("%d",a[i] }

3 2402


2 2014

what is the difference between c and java?

1 2696

what is mallloc()?how it works?


4 3698

how can we use static and extern?and where can we use this?


3 4389

how to use enum datatype?Please explain me?


3 3330

What is RAM memory? and What is ROM?Who designed one is temparary and another is permanent?why they designed like that?By using far pointer which type data(whether hexadecimal)we can access?


1 3230

What are the languages are portable and platform independent?Why they are like that?

Satyam, Excel,

1 2243

pointer_variable=(typecasting datatype*)malloc(sizeof(datatype)); This is the syntax for malloc?Please explain this,how it work with an example?

kenexa, eClerx, Excel,

2 5834

how can i get this by using for loop? * ** * **** * ******


3 2347

#include int main ( int argc, char* argv [ ] ) { int value1 = 10; int value2 = 5; printf ( "\n The sum is :%d", value1 | value2 ); } This is the answer asked by some one to add two numbers with out using arithmetic operator?Yes this answer is write it given out put as 15.But how????? what is need of following line? int main ( int argc, char* argv [ ] ) how it work?what is the meaning for this line? please explain me.Advance thanks


9 7516

Why data types in all programming languages have some range? Why ritche have disigned first time likethat?Why not a single data type can support all other types?


2 2660

write a program structure to find average of given number

1 3805

Post New C Questions

Un-Answered Questions { C }

Between macros and functions,which is better to use and why?


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)


How to write a code for reverse of string without using string functions?


i got 75% in all semester am i eligible for your company


.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }


Which driver is a pure java driver


how to count no of words,characters,lines in a paragraph.


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.


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.


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


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me


When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays