Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

C Code Interview Questions
Questions Answers Views Company eMail

1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.

3 3368

main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }

1 7649

main() { int i=4,j=7; j = j || i++ && printf("YOU CAN"); printf("%d %d", i, j); }

1 5332

main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }

3 5890

main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }

2 5832

main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }

1 2749

main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }

6 10366

main() { char *p="GOOD"; char a[ ]="GOOD"; printf("\n sizeof(p) = %d, sizeof(*p) = %d, strlen(p) = %d", sizeof(p), sizeof(*p), strlen(p)); printf("\n sizeof(a) = %d, strlen(a) = %d", sizeof(a), strlen(a)); }

1 3510

#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }

1 5022

int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }

CSC,

2 6982

main() { static int a[3][3]={1,2,3,4,5,6,7,8,9}; int i,j; static *p[]={a,a+1,a+2}; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j), *(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i)); } }

1 9483

main() { void swap(); int x=10,y=8; swap(&x,&y); printf("x=%d y=%d",x,y); } void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }

2 5631

main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }

CSC,

1 6482

main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }

1 5780

main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); }

CSC,

4 16344


Post New C Code Questions






Un-Answered Questions { C Code }

How to palindrom string in c language?

6592


write a program for area of circumference of shapes

1503


Design an implement of the inputs functions for event mode

2334


In a gymnastic competition, scoring is based on the average of all scores given by the judges excluding the maximum and minimum scores. Let the user input the number of judges, after that, input the scores from the judges. Output the average score. Note: In case, more than two judges give the same score and it happens that score is the maximum or minimum then just eliminate two scores. For example, if the number of judges is 5 and all of them give 10 points each. Then the maximum and minimum score is 10. So the computation would be 10+10+10, this time. The output should be 10 because 30/3 is 10.

1722


write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30

1632






#include int main(void) { int a=4, b=2; a=b<>2 ; printf("%d",a); return 0; }

470


How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?

1410


Write a program to model an exploding firecracker in the xy plane using a particle system

3087


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

1682


could you please send the program code for multiplying sparse matrix in c????

2519


how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.

1583


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

2515


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

1615


Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines

2439


Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?

3218