C Interview Questions
Questions Answers Views Company eMail

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

Wipro, Accenture,

1053

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 4305

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

1 5131




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 1950

what is the return type of printf

3 2839

what is difference between ANSI structure and C99 Structure?

Wipro,

1 2883

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?

Wipro,

1 2772

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

1 2135




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 6186

what is the difference b/w NULL and null?

HSBC, IBM,

3 3288

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

3 3693

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

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

71 207421

what type of questions arrive in interview over c programming?

795

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

1 2546

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 1302


Post New C Questions






Un-Answered Questions { C }

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.

3143


Which driver is a pure java driver

120


what is the significance of static storage class specifier?

821


how is the examination pattern?

814


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

870






Write the test cases for checking a variable having value in range -10.0 to +10.0?

882


the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....

15932


difference between Low, Middle, High Level languages in c ?

781


Difference between Shallow copy and Deep copy?

779


hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel

649


what are bit fields? What is the use of bit fields in a structure declaration?

700


how could explain about job profile

679


write a program to print largest number of each row of a 2D array

1071


Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80

1505


write a progrmm in c language take user interface generate table using for loop?

769