Find the O/p of the following
struct node
{
char *name;
int num;
};
int main()
{
struct node s1={"Harry",1331};
struct node s2=s1;
if(s1==s2)
printf("Same");
else
printf("Diff");
}
Answer / sinchan garai
this gives a compile time error.because the coditional
statement "if(s1==s2)" written in the code is not allowable
in C.
| Is This Answer Correct ? | 4 Yes | 2 No |
a memory of 20 bytes is allocated to a string declared as char *s then the following two statements are executed: s="Etrance" l=strlen(s); what is the value of l ? a.20 b.8 c.9 d.21
What is NULL pointer?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
Table of Sudoku n*n
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Q. where is the below variables stored ? - volatile, static, register
Write the program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures.
What is a lvalue
Why doesnt long int work?
int a=2,b=3,c=4; printf("a=%d,b=%d\n",a,b,c); what is the o/p?
how to write optimum code to divide a 50 digit number with a 25 digit number??
#include<string.h> void main() { String s1[]={"swathi"}; string s2[]={"maddimsetti"}; s1[]=s[]; printf("%s",s1[]); }