C Inter (1) UPDATED Sep 18
C Inter (1) UPDATED Sep 18
C Inter (1) UPDATED Sep 18
Int a , b, c;
a=3;b=5;
c=a+b;
ARI
3. void( )
Void( );
5.Syntax of malloc ?
6.Copy the arry1 to arry2 with different indexes ,what is the logic you will use?
7.Without using strlen library function ,how will you implement to find length of string?
2.What is the difference between structures and unions ?Where do we use unions?
6.Bit manipulations using logic operators, count the no,of 1’s in abyte?
i = ! i > 15;
P= &j[3];
Str = p;
Str1= j;
Int *p, *q ;
P=&a[2][2][2];
*q =***a;
…...........................................................................................................................
P1=p;
While(*p!=’\0’)
++*p++;
Printf(“%s %s ”,p,p1);
3.Structure padding
struct a
{ int a;
Char b;
Float c;
Short d;
Struct a
Int *a;
Char *b;
Float *c;
Short *d;
Fill the above structure members and print the values in the structure members?
6.How to exit from while loop without using return ,break, continue ?
PATHPARTNER
2.Using 2 arrays write a function to find common element in both A and B arrays.
3.find the output of the following program
main()
{int x,y;
x=5=N;
fib( );
printf(“%d”, x);
int fib(int n)
{int Num,
N;
return ;
printf(“%d”,N);
x - -;
fib( );
return ;
4.Functions for binary input to convert all numbers to 1 after 1’s bit.
5.Write a program to use space and time complexity for count multiple integers numbers with out using
array.
TECH MAHINDRA
VALEO
6.How raw values are converted into human understandable values(explain logic)?
8.main( )
printf(“%p”,main);
9.main( )
clrscr( );
clrscr( );
what is output?
10.main( )
{
char *p;
p=”hello”;
printf(“%c”,*P);
VIZZITECH SOLUTIONS
2.storage classes in C?
6.What is sorting?
VOTARY TECH
1.Program for multiplication given by user. Multiplication number and row no. to be multiplied given by
the user
5*1=5 to 5*20=100;
2.Enter the numbers ex:5, the range of no. is stored in an array. Write a program using functions to print
the reverse of given array and main function program is used only to print reverse numbers.
3.Program to print the prime numbers ,given by the user (10 to 1000),(50 to 2000)and program using
functions.
4.write the decimal output for following.(no need of program)just write steps.
I) v1=45, v2=036
VOTARY TECH
WINIT SOLUTIONS
3.suduko validation/
9.using single for loop compare two arrays having common elements?
XPETIZE
NCR
1.Can you write a program to display prime numbers for range n given by the user?
2.Write a program for fibnocci series?
4.char x[50]={1,2,3,4,5,6,5,4,3,2,5,69,54,33,2,12,34,,54,9........};
int *iptr;
iptr=&x[10];
iptr-=2;
*iptr=25;
where 25 store?
5.int i=10;
printf("%d%d%d%d",++i,i/2,i,--i/2);
3.can we use memcopy insteadof copy from user and copy to user.
/* HCL interview on 25-02 first round written test second round face to face */
1.clear a 9th bit in an integer.
2.enum day{monday,tuesday,wednesday};
3.reverse string.
4.strstr,strcat,strchar.
10.a=o24 printf("%d",a);
/*--------------*/
1. n*5;
1=n
2=n-1;
3=n-3;
4.n&(n-1)
10.int a=3,b=5,c;
c=a+++7;
4.in a int variable assign a vlaue and then swap the bit positions i.e in 32 bits swap 0,1 and 2,3......30,31.
power(x);
int power(unsigned int x)
unsigned int i;
if(x==0)
return 1;
for(i=x-1;i<=0;++i)
result *=2;
return result;
2.what is volatile?
/*winit software*/
1st round
n=4; n=5;
2 1
1 2 3 1 2
1 2 3 4 1 2 3
1 2 3 1 2 3 4
1 1 2 3 4 5
1 2 3 4
1 2 3
1 2
4. Write aprogram for finding no.fo Zeros & ones and display them .
5. Write aprogram for the given numbers in order like asssending and desending order.
/*votary tech*/
2.Write a program for the ATM cash withdraw what logic you used.
3.Reversing a string.
4.Tell me about some sorting technics?
unsign a =8FFFFFFF
unsign a =0X87654321
8)find the size of array when there is no datatype and arraysize or without using sizeof opereator?
dmf a,b;
tmf x,y;
–– 12
– 1 23
1234
13) how to optimize the code writing if,elseif conditions ,not for checking condition directly go and
execute exact condition?
1.c 2.c
HCL
input: I AM A ProGRAMMER
output: PROGRAMMER A AM I
2 3 4
5 6 7 8 9
10 11 12 13 14 15 16
input: APP.C
output: APP