HCL Interview Question for Developer Program Engineers


Team: 8
Country: India
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
0
of 0 vote

Not sure what exactly is the expected pattern. It looks like you need 4 bits from bit 2 to bit 5. Can this work

#define unknown_bit_process(x)         ((x) >> 2) & 0xf)

- Sreekanth November 20, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

LOL @ Sreekanth

Are you a moron?

- Miguel Oliveira November 23, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

package test;

public class binary
{

public static void main(String arg[])
{
String s = "11000011";
for(int i=0; i<s.length() ; i++)
{
if(i+1 < s.length() && s.charAt(i)!= s.charAt(i+1))
{
int index = i+1;
char c = s.charAt(index);
System.out.print(c);

for(int j = i+2 ; j < s.length(); j++)
{
if(j+1 < s.length() && c != s.charAt(j))
{
break;
}
else
{
System.out.print(s.charAt(j));
}
}

break;


}

}
}

}

- Preeti sharma February 25, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

package test;

public class binary
{

public static void main(String arg[])
{
String s = "11000011";
for(int i=0; i<s.length() ; i++)
{
if(i+1 < s.length() && s.charAt(i)!= s.charAt(i+1))
{
int index = i+1;
char c = s.charAt(index);
System.out.print(c);

for(int j = i+2 ; j < s.length(); j++)
{
if(j+1 < s.length() && c != s.charAt(j))
{
break;
}
else
{
System.out.print(s.charAt(j));
}
}

break;


}

}
}

}

- Preeti Sharma February 25, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

package test;

public class binary
{

public static void main(String arg[])
{
String s = "11000011";
for(int i=0; i<s.length() ; i++)
{
if(i+1 < s.length() && s.charAt(i)!= s.charAt(i+1))
{
int index = i+1;
char c = s.charAt(index);
System.out.print(c);

for(int j = i+2 ; j < s.length(); j++)
{
if(j+1 < s.length() && c != s.charAt(j))
{
break;
}
else
{
System.out.print(s.charAt(j));
}
}

break;


}

}
}

}

- Preeti Sharma February 25, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

package test;

public class binary 
{

	public static void main(String arg[])
	{
		String s = "11000011";
		for(int i=0; i<s.length() ; i++)
		{
			if(i+1 < s.length() && s.charAt(i)!= s.charAt(i+1))
			{
				int index = i+1;
				char c = s.charAt(index);
				System.out.print(c);
				
				for(int j = i+2 ; j < s.length(); j++)
				{
					if(j+1 < s.length() && c != s.charAt(j))
					{
						break;
					}
					else
					{
						System.out.print(s.charAt(j));
					}
				}
				
				break;	
					
					
				}
				
			}
		}
	
}

- Preeti Sharma February 25, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Hi can any one help me.....i have one question for......

Print how many arguments passed in function...using c language..
mail id: battu.jeevan1991@gmail.com

- jeevan March 24, 2016 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More