When do we get logical errors?
void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case
what will be the output of this program main() { int i=1; while (i<=10); { i++; } }
#define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
14 Answers CDAC, GATE, NDS, TCS,
How pointer is benefit for design a data structure algorithm?
write an algorithm to display a square matrix.
int array[]={1,2,3,4,5,6,7,8}; #define SIZE (sizeof(array)/sizeof(int)) main() { if(-1<=SIZE) printf("1"); else printf("2"); }
What are qualifiers?
What are categories used for in c?
a=0; b=(a=0)?2:3; a) What will be the value of b? why b) If in 1st stmt a=0 is replaced by -1, b=? c) If in second stmt a=0 is replaced by -1, b=?
prog for 1st five prime numbers in 2^x - 1
What will happen when freeing memory twice
#include<stdio.h> void main() { char *str; long unsigned int add; str="Hello C"; add=&str[0]; printf("%c",add); } What is the output?