C Interview Questions
Questions Answers Views Company eMail

write a program for the normal snake games find in most of the mobiles.

Wipro, Accenture,


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)

IBM, HCL, Satyam, Vimal, Vimukti Technologies,

2 4270

how to reverse string "Hello World" by using pointers only. Without any temp var

1 4991

What has to put when we are inserting as assembly language code into the C code? or When we are inserting as assembly language code into the C code we have to insert one thing at the start and of the assembly language. What are they?

2 1910

what is the return type of printf

3 2800

what is difference between ANSI structure and C99 Structure?


1 2841

struct abc { unsigned int a; char b; float r; }; struct xyz { int u; struct abc tt; }ww; ww = (struct xyz*)malloc(sizeof(struct xyz)); will the memory be allocated for the inner structure also?


1 2657

Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

1 2097

Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.

Accenture, IBM, TCS, Vimukti Technologies, Gridco, Kevin IT,

7 6087

what is the difference b/w NULL and null?


3 3222

void main() { int a[]={1,2,3,4,5},i; for(i=0;i<5;i++) printf("%d",a++); getch(); }

3 3624

what is the meaning of java that is (J A V A) full form of JAVA

BPO, HCL, BNL, Peacecon, AKS University, Bhel,

71 204960

what type of questions arrive in interview over c programming?


main() { int i; printf("%d", &i)+1; scanf("%d", i)-1; }

1 2478

In the below code, how do you modify the value 'a' and print in the function. You'll be allowed to add code only inside the called function. main() { int a=5; function(); // no parameters should be passed } function() { /* add code here to modify the value of and print here */ }

1 1264

Post New C Questions

Un-Answered Questions { C }

What is the difference between if else and switchstatement


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.




What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.


difference between native and cross compilers


what do u mean by Direct access files? then can u explain about Direct Access Files?


write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1


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


Hai what is the different types of versions and their differences


writ a program to compare using strcmp VIVA and viva with its output.


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.


How will you find a duplicate number in a array without negating the nos ?


why return type of main is not necessary in linux


Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff