Thursday, 1 August 2013
Tuesday, 23 July 2013
Simple C and C++ logic
///.....Simple Logic...///
#include<stdio.h>
int main()
{
int arr[1]={10};
printf("%d\n", 0[arr]);
return 0;
}
Friday, 19 July 2013
C Logic
Find OutPut :
int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, m;
i = ++a[1];
j = a[1]++;
m = a[i++];
printf("%d, %d, %d", i, j,
m);
return 0
}
Saturday, 6 July 2013
C Pointer
What will be the output?
#include<stdio.h>
int main()
{
char *names[] = {
"Syam", "soorya", "arun", "Baiju",
"jino"};
int i;
char *t;
t = names[3];
names[3] = names[4];
names[4] = t;
for(i=0; i<=4; i++)
printf("%s,",
names[i]);
return 0;
}
C Aptitudes
What will be the output of the program?
#include<stdio.h>
#include<string.h>
int main()
{
char str1[20] = "Hello",
str2[20] = " World";
printf("%s\n",
strcpy(str2, strcat(str1, str2)));
return 0;
}
Subscribe to:
Comments (Atom)

