C Interview Questions
Questions Answers Views Company eMail

Difference between Shallow copy and Deep copy?

806

#include void main() { char *str; long unsigned int add; str="Hello C"; add=&str[0]; printf("%c",add); } What is the output?

Infosys,

4 5159

hello everybody can we change a the adress of a variabl i mean can i put for exemple for a int *p: &p=6 ?????????

1 1802




please send me the code for multiplying sparse matrix using c

978

what is diference between return 0 and return NULL??

3 2823

#include void main() { int a=5,b=6,c; int x=(a

IBM,

8 7584

What are pointers in C?

KPIT,

5 3804

what is difference between #include and #include"stdio.h"

4 3235




how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

1960

Write a function that accepts a sentence as a parameter, and returns the same with each of its words reversed. The returned sentence should have 1 blank space between each pair of words. Demonstrate the usage of this function from a main program. Example: Parameter: “jack and jill went up a hill” Return Value: “kcaj dna llij tnew pu a llih”

Mind Tree,

5 12087

Explain this code. #include void f1(int *k) { *k = *k + 10; } main ( ){ int i; i = 0; printf (" The value of i before call %d \n", i); f1 (&i); printf (" The value of i after call %d \n", i); }

IBM,

3 2077

LOGIC OF Bodmas?

1 6163

main() { int i = -3,j=2,k=0,m; m= ++i || ++j && ++k; printf("%d%d%d",i,j,k,m); }

HCL,

6 11390

define c

TCS, HCL,

6 3852

what is C?

Syntel,

9 4832


Post New C Questions






Un-Answered Questions { C }

diff between exptected result and requirement?

812


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

653


what is the basis for selection of arrays or pointers as data structure in a program

2967


which is an algorithm for sorting in a growing Lexicographic order

609


how we can make 3d venturing graphics on outer interface

2727






we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?

26


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

859


regarding pointers concept

747


cavium networks written test pattern ..

2119


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

1079


In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]

1137


A set of N billiard balls are set on a one-dimensional table. The table is 1 meter long, set north-south with two pockets at either side. Each ball has zero width and there is no friction so it is moving with a fixed velocity of either northward or southward and bounces back in a perfect elastic collision from other balls it encounter on its way (or drop into one of the pockets). Your job is to keep track of the balls movements. Task Please write a program that gets the initial place, speed and direction of all the balls and gives the position of a specific ball after t seconds. Input The first line contains the number of scenarios. Each one of the other lines in the input contains a scenario: The first number, N, is the number of balls; followed by N pairs of numbers: the distance in centimeters from the south end of the table and the speed (positive speed meaning it moves northward); the last two numbers are the number i of the target ball you should track and the time T in seconds. Output The output is a single number for each line which is the place (distance in centimeters from the south end of the table) of the tracked ball after T seconds. Note: There is no new line character at the end of the result. Sample Input 5 1 50 1 1 1000 1 50 1 1 6 1 60 -2 1 6 2 10 1 95 -1 2 30 2 10 1 95 -1 2 60 Sample Output 100 56 48 65 70

1273


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

383


write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

794


what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555

1520