Test your C skills

#include<stdio.h>

int main()

{

void fun(int, int[]);

int arr[] = {1, 2, 3, 4};

int i;

fun(4, arr);

for(i=0; i<4; i++)

printf("%d,", arr[i]);

return 0;

}

void fun(int n, int arr[])

{

int *p=0;

int i=0;

while(i++ < n)

p = &arr[i];

*p=0;

}


what is the output?

#include<stdio.h>

int main()

{

printf("%%%%\n");

return 0;

}


What do the following declaration signify?

int (*ptr)[30];


Which of the following statements are correct about the below program?

#include<stdio.h>

int main()

{

float a=1.5, b=1.55;

if(a=b)

printf("a and b are equal\n");

else

printf("a and b are not equal\n");

return 0;

}


What will be the output of the program ?

#include<stdio.h>

int main()

{

int arr[5], i=0;

while(i<5)

arr[i]=++i;

for(i=0; i<5; i++)

printf("%d, ", arr[i]);

return 0;

}





























































Discussion
1 Follower
Test: 1

Your Facebook Friends on WizIQ